‪TYPO3CMS  9.5
TYPO3\CMS\Setup\Controller\SetupModuleController Class Reference
Inheritance diagram for TYPO3\CMS\Setup\Controller\SetupModuleController:
TYPO3\CMS\Core\Compatibility\PublicPropertyDeprecationTrait TYPO3\CMS\Core\Compatibility\PublicMethodDeprecationTrait

Public Member Functions

 __construct ()
 
TYPO3 CMS Core FormProtection BackendFormProtection getFormProtection ()
 
ResponseInterface mainAction (ServerRequestInterface $request)
 
string renderLanguageSelect ()
 
string renderStartModuleSelect ()
 
 simulateUser ()
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Core\Compatibility\PublicPropertyDeprecationTrait
bool __isset (string $propertyName)
 
mixed __get (string $propertyName)
 
 __set (string $propertyName, $propertyValue)
 
 __unset (string $propertyName)
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Core\Compatibility\PublicMethodDeprecationTrait
mixed __call (string $methodName, array $arguments)
 

Public Attributes

const PASSWORD_NOT_UPDATED = 0
 
const PASSWORD_UPDATED = 1
 
const PASSWORD_NOT_THE_SAME = 2
 
const PASSWORD_OLD_WRONG = 3
 

Protected Member Functions

 storeIncomingData ()
 
 init ()
 
string getJavaScript ()
 
 main ()
 
 getButtons ()
 
array renderUserSetup ()
 
bool checkAccess (array $config)
 
string getLabel ($str, $key='', $addLabelTag=true)
 
string getCSH ($str, $label)
 
string[] getFieldsFromShowItem ()
 
int getAvatarFileUid ($beUserId)
 
 setAvatarFileUid ($beUserId, $fileUid, array &$storeRec)
 
 addAvatarButtonJs ($fieldName)
 
TYPO3 CMS Core Authentication BackendUserAuthentication getBackendUser ()
 
TYPO3 CMS Core Localization LanguageService getLanguageService ()
 
 addFlashMessages ()
 
 enqueueFlashMessages (array $flashMessages)
 
FlashMessage getFlashMessage ($message, $title, $severity=FlashMessage::OK)
 

Protected Attributes

array $MOD_MENU = array( )
 
array $MOD_SETTINGS = array( )
 
string $content
 
array $overrideConf
 
 $OLD_BE_USER
 
bool $languageUpdate
 
bool $pagetreeNeedsRefresh = false
 
bool $isAdmin
 
array $tsFieldConf
 
bool $saveData = false
 
int $passwordIsUpdated = self::PASSWORD_NOT_UPDATED
 
bool $passwordIsSubmitted = false
 
bool $setupIsUpdated = false
 
bool $settingsAreResetToDefault = false
 
TYPO3 CMS Core FormProtection BackendFormProtection $formProtection
 
string $simulateSelector = ''
 
int $simUser
 
string $moduleName = 'user_setup'
 
ModuleTemplate $moduleTemplate
 

Private Attributes

array $deprecatedPublicProperties
 
array $deprecatedPublicMethods
 

Detailed Description

Script class for the Setup module

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

Definition at line 48 of file SetupModuleController.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Setup\Controller\SetupModuleController::__construct ( )

Instantiate the form protection before a simulated user is initialized.

Definition at line 179 of file SetupModuleController.php.

References TYPO3\CMS\Core\FormProtection\FormProtectionFactory\get(), and TYPO3\CMS\Setup\Controller\SetupModuleController\getLanguageService().

Member Function Documentation

◆ addAvatarButtonJs()

TYPO3\CMS\Setup\Controller\SetupModuleController::addAvatarButtonJs (   $fieldName)
protected

Add JavaScript to for browse files button

Parameters
string$fieldName

Definition at line 1029 of file SetupModuleController.php.

Referenced by TYPO3\CMS\Setup\Controller\SetupModuleController\renderUserSetup().

◆ addFlashMessages()

◆ checkAccess()

bool TYPO3\CMS\Setup\Controller\SetupModuleController::checkAccess ( array  $config)
protected

Returns access check (currently only "admin" is supported)

Parameters
array$config‪Configuration of the field, access mode is defined in key 'access'
Returns
‪bool Whether it is allowed to modify the given field

Definition at line 794 of file SetupModuleController.php.

References $GLOBALS, and TYPO3\CMS\Setup\Controller\SetupModuleController\$isAdmin.

Referenced by TYPO3\CMS\Setup\Controller\SetupModuleController\renderUserSetup(), and TYPO3\CMS\Setup\Controller\SetupModuleController\storeIncomingData().

◆ enqueueFlashMessages()

TYPO3\CMS\Setup\Controller\SetupModuleController::enqueueFlashMessages ( array  $flashMessages)
protected
Parameters
array$flashMessages
Exceptions

Definition at line 1122 of file SetupModuleController.php.

Referenced by TYPO3\CMS\Setup\Controller\SetupModuleController\addFlashMessages().

◆ getAvatarFileUid()

int TYPO3\CMS\Setup\Controller\SetupModuleController::getAvatarFileUid (   $beUserId)
protected

Get Avatar fileUid

Parameters
int$beUserId
Returns
‪int

Definition at line 914 of file SetupModuleController.php.

Referenced by TYPO3\CMS\Setup\Controller\SetupModuleController\renderUserSetup(), and TYPO3\CMS\Setup\Controller\SetupModuleController\setAvatarFileUid().

◆ getBackendUser()

◆ getButtons()

TYPO3\CMS\Setup\Controller\SetupModuleController::getButtons ( )
protected

Create the panel of buttons for submitting the form or otherwise perform operations.

Definition at line 432 of file SetupModuleController.php.

References TYPO3\CMS\Setup\Controller\SetupModuleController\getLanguageService(), and TYPO3\CMS\Core\Imaging\Icon\SIZE_SMALL.

Referenced by TYPO3\CMS\Setup\Controller\SetupModuleController\main().

◆ getCSH()

string TYPO3\CMS\Setup\Controller\SetupModuleController::getCSH (   $str,
  $label 
)
protected

Returns the CSH Icon for given string

Parameters
string$str‪Locallang key
string$label‪The label to be used, that should be wrapped in help
Returns
‪string HTML output.

Definition at line 844 of file SetupModuleController.php.

References TYPO3\CMS\Backend\Utility\BackendUtility\wrapInHelp().

Referenced by TYPO3\CMS\Setup\Controller\SetupModuleController\renderUserSetup().

◆ getFieldsFromShowItem()

string [] TYPO3\CMS\Setup\Controller\SetupModuleController::getFieldsFromShowItem ( )
protected

Returns array with fields defined in $GLOBALS['TYPO3_USER_SETTINGS']['showitem'] Remove fields which are disabled by user TSconfig

Returns
‪string[] Array with field names visible in form

Definition at line 865 of file SetupModuleController.php.

References $GLOBALS, and TYPO3\CMS\Setup\Controller\SetupModuleController\getBackendUser().

Referenced by TYPO3\CMS\Setup\Controller\SetupModuleController\renderUserSetup(), and TYPO3\CMS\Setup\Controller\SetupModuleController\storeIncomingData().

◆ getFlashMessage()

FlashMessage TYPO3\CMS\Setup\Controller\SetupModuleController::getFlashMessage (   $message,
  $title,
  $severity = FlashMessage::OK 
)
protected
Parameters
string$message
string$title
int$severity
Returns
‪FlashMessage

Definition at line 1137 of file SetupModuleController.php.

References TYPO3\CMS\Setup\Controller\SetupModuleController\getLanguageService().

Referenced by TYPO3\CMS\Setup\Controller\SetupModuleController\addFlashMessages().

◆ getFormProtection()

TYPO3 CMS Core FormProtection BackendFormProtection TYPO3\CMS\Setup\Controller\SetupModuleController::getFormProtection ( )

Getter for the form protection instance.

Returns
‪\TYPO3\CMS\Core\FormProtection\BackendFormProtection
Deprecated:
‪since TYPO3 v9, will be removed in TYPO3 v10.0.

Definition at line 198 of file SetupModuleController.php.

References TYPO3\CMS\Setup\Controller\SetupModuleController\$formProtection.

◆ getJavaScript()

string TYPO3\CMS\Setup\Controller\SetupModuleController::getJavaScript ( )
protected

Generate necessary JavaScript

Returns
‪string

Definition at line 357 of file SetupModuleController.php.

References $GLOBALS.

◆ getLabel()

string TYPO3\CMS\Setup\Controller\SetupModuleController::getLabel (   $str,
  $key = '',
  $addLabelTag = true 
)
protected

Returns the label $str from getLL() and grays out the value if the $str/$key is found in $this->overrideConf array

Parameters
string$str‪Locallang key
string$key‪Alternative override-config key
bool$addLabelTag‪Defines whether the string should be wrapped in a <label> tag.
Returns
‪string HTML output.

Definition at line 821 of file SetupModuleController.php.

References TYPO3\CMS\Setup\Controller\SetupModuleController\getLanguageService().

Referenced by TYPO3\CMS\Setup\Controller\SetupModuleController\renderUserSetup().

◆ getLanguageService()

◆ init()

TYPO3\CMS\Setup\Controller\SetupModuleController::init ( )
protected

◆ main()

◆ mainAction()

ResponseInterface TYPO3\CMS\Setup\Controller\SetupModuleController::mainAction ( ServerRequestInterface  $request)

Injects the request object for the current request or subrequest Simply calls main() and init() and writes the content to the response

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

Definition at line 421 of file SetupModuleController.php.

References TYPO3\CMS\Setup\Controller\SetupModuleController\init(), TYPO3\CMS\Setup\Controller\SetupModuleController\main(), and TYPO3\CMS\Setup\Controller\SetupModuleController\storeIncomingData().

◆ renderLanguageSelect()

string TYPO3\CMS\Setup\Controller\SetupModuleController::renderLanguageSelect ( )

Return a select with available languages. This method is called from the setup module fake TCA userFunc.

Returns
‪string Complete select as HTML string or warning box if something went wrong.

Definition at line 658 of file SetupModuleController.php.

References $GLOBALS, $locales, TYPO3\CMS\Setup\Controller\SetupModuleController\getBackendUser(), TYPO3\CMS\Core\Core\Environment\getLabelsPath(), and TYPO3\CMS\Setup\Controller\SetupModuleController\getLanguageService().

◆ renderStartModuleSelect()

string TYPO3\CMS\Setup\Controller\SetupModuleController::renderStartModuleSelect ( )

Returns a select with all modules for startup. This method is called from the setup module fake TCA userFunc.

Returns
‪string Complete select as HTML string

Definition at line 704 of file SetupModuleController.php.

References $GLOBALS, TYPO3\CMS\Setup\Controller\SetupModuleController\getBackendUser(), and TYPO3\CMS\Setup\Controller\SetupModuleController\getLanguageService().

◆ renderUserSetup()

◆ setAvatarFileUid()

TYPO3\CMS\Setup\Controller\SetupModuleController::setAvatarFileUid (   $beUserId,
  $fileUid,
array &  $storeRec 
)
protected

◆ simulateUser()

TYPO3\CMS\Setup\Controller\SetupModuleController::simulateUser ( )

Will make the simulate-user selector if the logged in user is administrator. It will also set the GLOBAL(!) BE_USER to the simulated user selected if any (and set $this->OLD_BE_USER to logged in user)

Deprecated:
‪since TYPO3 v9, will be removed in TYPO3 v10.0.

Definition at line 735 of file SetupModuleController.php.

References TYPO3\CMS\Setup\Controller\SetupModuleController\getBackendUser().

◆ storeIncomingData()

Member Data Documentation

◆ $content

string TYPO3\CMS\Setup\Controller\SetupModuleController::$content
protected

Definition at line 103 of file SetupModuleController.php.

◆ $deprecatedPublicMethods

array TYPO3\CMS\Setup\Controller\SetupModuleController::$deprecatedPublicMethods
private
Initial value:
= array(
'storeIncomingData' => 'Using SetupModuleController::storeIncomingData() is deprecated and will not be possible anymore in TYPO3 v10.0.',
'main' => 'Using SetupModuleController::main() is deprecated and will not be possible anymore in TYPO3 v10.0.',
'init' => 'Using SetupModuleController::init() is deprecated and will not be possible anymore in TYPO3 v10.0.',
)

Definition at line 87 of file SetupModuleController.php.

◆ $deprecatedPublicProperties

array TYPO3\CMS\Setup\Controller\SetupModuleController::$deprecatedPublicProperties
private
Initial value:
= array(
'OLD_BE_USER' => 'Using $OLD_BE_USER of class SetupModuleController from the outside is discouraged, the variable will be removed.',
'MOD_MENU' => 'Using $MOD_MENU of class SetupModuleController from the outside is discouraged, the variable will be removed.',
'MOD_SETTINGS' => 'Using $MOD_SETTINGS of class SetupModuleController from the outside is discouraged, the variable will be removed.',
'content' => 'Using $content of class SetupModuleController from the outside is discouraged, as this variable is only used for internal storage.',
'overrideConf' => 'Using $overrideConf of class SetupModuleController from the outside is discouraged, as this variable is only used for internal storage.',
'languageUpdate' => 'Using $languageUpdate of class SetupModuleController from the outside is discouraged, as this variable is only used for internal storage.',
)

Properties which have been moved to protected status from public

Definition at line 76 of file SetupModuleController.php.

◆ $formProtection

TYPO3 CMS Core FormProtection BackendFormProtection TYPO3\CMS\Setup\Controller\SetupModuleController::$formProtection
protected

Form protection instance

Definition at line 154 of file SetupModuleController.php.

Referenced by TYPO3\CMS\Setup\Controller\SetupModuleController\getFormProtection().

◆ $isAdmin

bool TYPO3\CMS\Setup\Controller\SetupModuleController::$isAdmin
protected

◆ $languageUpdate

bool TYPO3\CMS\Setup\Controller\SetupModuleController::$languageUpdate
protected

Definition at line 116 of file SetupModuleController.php.

◆ $MOD_MENU

array TYPO3\CMS\Setup\Controller\SetupModuleController::$MOD_MENU = array( )
protected

Definition at line 95 of file SetupModuleController.php.

◆ $MOD_SETTINGS

array TYPO3\CMS\Setup\Controller\SetupModuleController::$MOD_SETTINGS = array( )
protected

Definition at line 99 of file SetupModuleController.php.

◆ $moduleName

string TYPO3\CMS\Setup\Controller\SetupModuleController::$moduleName = 'user_setup'
protected

The name of the module

Definition at line 168 of file SetupModuleController.php.

◆ $moduleTemplate

ModuleTemplate TYPO3\CMS\Setup\Controller\SetupModuleController::$moduleTemplate
protected

ModuleTemplate object

Definition at line 174 of file SetupModuleController.php.

◆ $OLD_BE_USER

TYPO3\CMS\Setup\Controller\SetupModuleController::$OLD_BE_USER
protected
Deprecated:
‪will be removed in TYPO3 v10.0

Definition at line 112 of file SetupModuleController.php.

◆ $overrideConf

array TYPO3\CMS\Setup\Controller\SetupModuleController::$overrideConf
protected

Definition at line 107 of file SetupModuleController.php.

◆ $pagetreeNeedsRefresh

bool TYPO3\CMS\Setup\Controller\SetupModuleController::$pagetreeNeedsRefresh = false
protected

Definition at line 120 of file SetupModuleController.php.

◆ $passwordIsSubmitted

bool TYPO3\CMS\Setup\Controller\SetupModuleController::$passwordIsSubmitted = false
protected

Definition at line 140 of file SetupModuleController.php.

◆ $passwordIsUpdated

int TYPO3\CMS\Setup\Controller\SetupModuleController::$passwordIsUpdated = self::PASSWORD_NOT_UPDATED
protected

Definition at line 136 of file SetupModuleController.php.

◆ $saveData

bool TYPO3\CMS\Setup\Controller\SetupModuleController::$saveData = false
protected

Definition at line 132 of file SetupModuleController.php.

◆ $settingsAreResetToDefault

bool TYPO3\CMS\Setup\Controller\SetupModuleController::$settingsAreResetToDefault = false
protected

Definition at line 148 of file SetupModuleController.php.

◆ $setupIsUpdated

bool TYPO3\CMS\Setup\Controller\SetupModuleController::$setupIsUpdated = false
protected

Definition at line 144 of file SetupModuleController.php.

◆ $simulateSelector

string TYPO3\CMS\Setup\Controller\SetupModuleController::$simulateSelector = ''
protected

Definition at line 158 of file SetupModuleController.php.

◆ $simUser

int TYPO3\CMS\Setup\Controller\SetupModuleController::$simUser
protected

Definition at line 162 of file SetupModuleController.php.

◆ $tsFieldConf

array TYPO3\CMS\Setup\Controller\SetupModuleController::$tsFieldConf
protected

Definition at line 128 of file SetupModuleController.php.

◆ PASSWORD_NOT_THE_SAME

◆ PASSWORD_NOT_UPDATED

const TYPO3\CMS\Setup\Controller\SetupModuleController::PASSWORD_NOT_UPDATED = 0

Flag if password has not been updated

Definition at line 54 of file SetupModuleController.php.

◆ PASSWORD_OLD_WRONG

const TYPO3\CMS\Setup\Controller\SetupModuleController::PASSWORD_OLD_WRONG = 3

◆ PASSWORD_UPDATED