‪TYPO3CMS  ‪main
TYPO3\CMS\Setup\Controller\SetupModuleController Class Reference

Public Member Functions

 __construct (protected readonly EventDispatcherInterface $eventDispatcher, protected readonly MfaProviderRegistry $mfaProviderRegistry, protected readonly IconFactory $iconFactory, protected readonly PageRenderer $pageRenderer, protected readonly ModuleTemplateFactory $moduleTemplateFactory, protected readonly LanguageServiceFactory $languageServiceFactory, protected readonly ModuleProvider $moduleProvider, protected readonly UriBuilder $uriBuilder, protected readonly FormProtectionFactory $formProtectionFactory, protected readonly Locales $locales,)
 
 mainAction (ServerRequestInterface $request)
 
string renderStartModuleSelect ()
 

Protected Member Functions

 initialize (ServerRequestInterface $request)
 
 processAdditionalJavaScriptModules ()
 
 storeIncomingData (ServerRequestInterface $request)
 
 getButtons (ModuleTemplate $view)
 
array renderUserSetup ()
 
string renderLanguageSelect ()
 
bool checkAccess (array $config)
 
string getLabel ($str, $key='', $addLabelTag=true)
 
string[] getFieldsFromShowItem ()
 
int getAvatarFileUid ($beUserId)
 
 setAvatarFileUid ($beUserId, $fileUid, array &$storeRec)
 
 addFlashMessages (ModuleTemplate $view)
 
 getBackendUser ()
 
 getLanguageService ()
 

Protected Attributes

const PASSWORD_NOT_UPDATED = 0
 
const PASSWORD_UPDATED = 1
 
const PASSWORD_NOT_THE_SAME = 2
 
const PASSWORD_OLD_WRONG = 3
 
const PASSWORD_POLICY_FAILED = 4
 
array $overrideConf = []
 
bool $languageUpdate = false
 
bool $pagetreeNeedsRefresh = false
 
array $tsFieldConf = []
 
int $passwordIsUpdated = self::PASSWORD_NOT_UPDATED
 
bool $passwordIsSubmitted = false
 
bool $setupIsUpdated = false
 
bool $settingsAreResetToDefault = false
 
PasswordPolicyValidator $passwordPolicyValidator
 

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 65 of file SetupModuleController.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Setup\Controller\SetupModuleController::__construct ( protected readonly EventDispatcherInterface  $eventDispatcher,
protected readonly MfaProviderRegistry  $mfaProviderRegistry,
protected readonly IconFactory  $iconFactory,
protected readonly PageRenderer  $pageRenderer,
protected readonly ModuleTemplateFactory  $moduleTemplateFactory,
protected readonly LanguageServiceFactory  $languageServiceFactory,
protected readonly ModuleProvider  $moduleProvider,
protected readonly UriBuilder  $uriBuilder,
protected readonly FormProtectionFactory  $formProtectionFactory,
protected readonly Locales  $locales 
)

Member Function Documentation

◆ 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 717 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().

◆ getAvatarFileUid()

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

◆ getBackendUser()

◆ getButtons()

TYPO3\CMS\Setup\Controller\SetupModuleController::getButtons ( ModuleTemplate  $view)
protected

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

Definition at line 337 of file SetupModuleController.php.

References TYPO3\CMS\Backend\Template\ModuleTemplate\getDocHeaderComponent(), and TYPO3\CMS\Setup\Controller\SetupModuleController\getLanguageService().

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

◆ 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 765 of file SetupModuleController.php.

References $GLOBALS, TYPO3\CMS\Setup\Controller\SetupModuleController\getBackendUser(), and TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode().

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

◆ getLabel()

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

Returns the label $str from sL() 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 743 of file SetupModuleController.php.

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

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

◆ getLanguageService()

◆ initialize()

TYPO3\CMS\Setup\Controller\SetupModuleController::initialize ( ServerRequestInterface  $request)
protected

◆ mainAction()

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

◆ processAdditionalJavaScriptModules()

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

◆ renderLanguageSelect()

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

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 646 of file SetupModuleController.php.

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

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

◆ 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 686 of file SetupModuleController.php.

References TYPO3\CMS\Webhooks\Message\$identifier, 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

Set avatar fileUid for backend user

Parameters
int$beUserId
numeric-string|''|'delete'‪$fileUid either a file UID, an empty string, or delete

Definition at line 839 of file SetupModuleController.php.

References TYPO3\CMS\Setup\Controller\SetupModuleController\getAvatarFileUid(), and TYPO3\CMS\Core\Database\Connection\PARAM_INT.

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

◆ storeIncomingData()

Member Data Documentation

◆ $languageUpdate

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

Definition at line 74 of file SetupModuleController.php.

◆ $overrideConf

array TYPO3\CMS\Setup\Controller\SetupModuleController::$overrideConf = []
protected

Definition at line 73 of file SetupModuleController.php.

◆ $pagetreeNeedsRefresh

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

Definition at line 75 of file SetupModuleController.php.

◆ $passwordIsSubmitted

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

Definition at line 78 of file SetupModuleController.php.

◆ $passwordIsUpdated

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

Definition at line 77 of file SetupModuleController.php.

◆ $passwordPolicyValidator

PasswordPolicyValidator TYPO3\CMS\Setup\Controller\SetupModuleController::$passwordPolicyValidator
protected

Definition at line 82 of file SetupModuleController.php.

◆ $settingsAreResetToDefault

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

Definition at line 80 of file SetupModuleController.php.

◆ $setupIsUpdated

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

Definition at line 79 of file SetupModuleController.php.

◆ $tsFieldConf

array TYPO3\CMS\Setup\Controller\SetupModuleController::$tsFieldConf = []
protected

Definition at line 76 of file SetupModuleController.php.

◆ PASSWORD_NOT_THE_SAME

const TYPO3\CMS\Setup\Controller\SetupModuleController::PASSWORD_NOT_THE_SAME = 2
protected

◆ PASSWORD_NOT_UPDATED

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

Definition at line 67 of file SetupModuleController.php.

◆ PASSWORD_OLD_WRONG

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

◆ PASSWORD_POLICY_FAILED

const TYPO3\CMS\Setup\Controller\SetupModuleController::PASSWORD_POLICY_FAILED = 4
protected

◆ PASSWORD_UPDATED

const TYPO3\CMS\Setup\Controller\SetupModuleController::PASSWORD_UPDATED = 1
protected