‪TYPO3CMS  10.4
TYPO3\CMS\Backend\Controller\SiteConfigurationController Class Reference

Public Member Functions

 __construct ()
 
ResponseInterface handleRequest (ServerRequestInterface $request)
 

Protected Member Functions

 overviewAction ()
 
 editAction (ServerRequestInterface $request)
 
ResponseInterface saveAction (ServerRequestInterface $request)
 
mixed validateAndProcessIdentifier (bool $isNew, string $identifier, int $rootPageId)
 
mixed validateAndProcessValue (string $tableName, string $fieldName, $fieldValue)
 
array validateFullStructure (array $newSysSiteData)
 
ResponseInterface deleteAction (ServerRequestInterface $request)
 
 initializeView (string $templateName)
 
 configureEditViewDocHeader ()
 
 configureOverViewDocHeader ()
 
array getAllSitePages ()
 
array getDuplicatedEntryPoints (array $allSites, array $pages)
 
LanguageService getLanguageService ()
 
BackendUserAuthentication getBackendUser ()
 

Protected Attributes

const ALLOWED_ACTIONS = ['overview', 'edit', 'save', 'delete']
 
ModuleTemplate $moduleTemplate
 
ViewInterface $view
 
SiteFinder $siteFinder
 

Detailed Description

Backend controller: The "Site management" -> "Sites" module

List all site root pages, CRUD site configuration.

This class is a specific Backend controller implementation and is not considered part of the Public TYPO3 API.

Definition at line 60 of file SiteConfigurationController.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Backend\Controller\SiteConfigurationController::__construct ( )

Default constructor

Definition at line 79 of file SiteConfigurationController.php.

Member Function Documentation

◆ configureEditViewDocHeader()

TYPO3\CMS\Backend\Controller\SiteConfigurationController::configureEditViewDocHeader ( )
protected

◆ configureOverViewDocHeader()

◆ deleteAction()

ResponseInterface TYPO3\CMS\Backend\Controller\SiteConfigurationController::deleteAction ( ServerRequestInterface  $request)
protected

Delete an existing configuration

Parameters
ServerRequestInterface$request
Returns
‪ResponseInterface

Definition at line 576 of file SiteConfigurationController.php.

◆ editAction()

TYPO3\CMS\Backend\Controller\SiteConfigurationController::editAction ( ServerRequestInterface  $request)
protected

Shows a form to create a new site configuration, or edit an existing one.

Parameters
ServerRequestInterface$request
Exceptions

Definition at line 147 of file SiteConfigurationController.php.

References $GLOBALS, and TYPO3\CMS\Backend\Controller\SiteConfigurationController\configureEditViewDocHeader().

◆ getAllSitePages()

array TYPO3\CMS\Backend\Controller\SiteConfigurationController::getAllSitePages ( )
protected

◆ getBackendUser()

BackendUserAuthentication TYPO3\CMS\Backend\Controller\SiteConfigurationController::getBackendUser ( )
protected
Returns
‪BackendUserAuthentication

Definition at line 733 of file SiteConfigurationController.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Backend\Controller\SiteConfigurationController\configureOverViewDocHeader().

◆ getDuplicatedEntryPoints()

array TYPO3\CMS\Backend\Controller\SiteConfigurationController::getDuplicatedEntryPoints ( array  $allSites,
array  $pages 
)
protected

Get all entry duplicates which are used multiple times

Parameters
Site[]$allSites
array$pages
Returns
‪array

Definition at line 697 of file SiteConfigurationController.php.

Referenced by TYPO3\CMS\Backend\Controller\SiteConfigurationController\overviewAction().

◆ getLanguageService()

◆ handleRequest()

ResponseInterface TYPO3\CMS\Backend\Controller\SiteConfigurationController::handleRequest ( ServerRequestInterface  $request)

Main entry method: Dispatch to other actions - those method names that end with "Action".

Parameters
ServerRequestInterface$request‪the current request
Returns
‪ResponseInterface the response with the content

Definition at line 91 of file SiteConfigurationController.php.

References TYPO3\CMS\Backend\Controller\SiteConfigurationController\initializeView().

◆ initializeView()

TYPO3\CMS\Backend\Controller\SiteConfigurationController::initializeView ( string  $templateName)
protected

Sets up the Fluid View.

Parameters
string$templateName

Definition at line 594 of file SiteConfigurationController.php.

Referenced by TYPO3\CMS\Backend\Controller\SiteConfigurationController\handleRequest().

◆ overviewAction()

TYPO3\CMS\Backend\Controller\SiteConfigurationController::overviewAction ( )
protected

◆ saveAction()

ResponseInterface TYPO3\CMS\Backend\Controller\SiteConfigurationController::saveAction ( ServerRequestInterface  $request)
protected

◆ validateAndProcessIdentifier()

mixed TYPO3\CMS\Backend\Controller\SiteConfigurationController::validateAndProcessIdentifier ( bool  $isNew,
string  $identifier,
int  $rootPageId 
)
protected

Validation and processing of site identifier

Parameters
bool$isNew‪If true, we're dealing with a new record
string$identifier‪Given identifier to validate and process
int$rootPageIdPage uid this identifier is bound to
Returns
‪mixed Verified / modified value

Definition at line 367 of file SiteConfigurationController.php.

References TYPO3\CMS\Backend\Controller\SiteConfigurationController\getLanguageService(), TYPO3\CMS\Core\Utility\StringUtility\getUniqueId(), TYPO3\CMS\Backend\Controller\SiteConfigurationController\validateAndProcessValue(), and TYPO3\CMS\Core\Messaging\AbstractMessage\WARNING.

Referenced by TYPO3\CMS\Backend\Controller\SiteConfigurationController\saveAction().

◆ validateAndProcessValue()

mixed TYPO3\CMS\Backend\Controller\SiteConfigurationController::validateAndProcessValue ( string  $tableName,
string  $fieldName,
  $fieldValue 
)
protected

Simple validation and processing method for incoming form field values.

Note this does not support all TCA "eval" options but only what we really need.

Parameters
string$tableName‪Table name
string$fieldName‪Field name
mixed$fieldValue‪Incoming value from FormEngine
Returns
‪mixed Verified / modified value
Exceptions
SiteValidationErrorException

Definition at line 434 of file SiteConfigurationController.php.

References $GLOBALS, TYPO3\CMS\Backend\Controller\SiteConfigurationController\getLanguageService(), TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode(), and TYPO3\CMS\Core\Messaging\AbstractMessage\WARNING.

Referenced by TYPO3\CMS\Backend\Controller\SiteConfigurationController\saveAction(), and TYPO3\CMS\Backend\Controller\SiteConfigurationController\validateAndProcessIdentifier().

◆ validateFullStructure()

array TYPO3\CMS\Backend\Controller\SiteConfigurationController::validateFullStructure ( array  $newSysSiteData)
protected

Last sanitation method after all data has been gathered. Check integrity of full record, manipulate if possible, or throw exception if unfixable broken.

Parameters
array$newSysSiteData‪Incoming data
Returns
‪array Updated data if needed
Exceptions

Definition at line 499 of file SiteConfigurationController.php.

References TYPO3\CMS\Backend\Controller\SiteConfigurationController\getLanguageService(), and TYPO3\CMS\Core\Messaging\AbstractMessage\WARNING.

Referenced by TYPO3\CMS\Backend\Controller\SiteConfigurationController\saveAction().

Member Data Documentation

◆ $moduleTemplate

ModuleTemplate TYPO3\CMS\Backend\Controller\SiteConfigurationController::$moduleTemplate
protected

Definition at line 66 of file SiteConfigurationController.php.

◆ $siteFinder

SiteFinder TYPO3\CMS\Backend\Controller\SiteConfigurationController::$siteFinder
protected

Definition at line 74 of file SiteConfigurationController.php.

◆ $view

ViewInterface TYPO3\CMS\Backend\Controller\SiteConfigurationController::$view
protected

Definition at line 70 of file SiteConfigurationController.php.

◆ ALLOWED_ACTIONS

const TYPO3\CMS\Backend\Controller\SiteConfigurationController::ALLOWED_ACTIONS = ['overview', 'edit', 'save', 'delete']
protected

Definition at line 62 of file SiteConfigurationController.php.