SetupModuleController

Script class for the Setup module

Internal

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

Table of Contents

Constants

PASSWORD_NOT_THE_SAME  = 2
Flag if both new passwords do not match
PASSWORD_NOT_UPDATED  = 0
Flag if password has not been updated
PASSWORD_OLD_WRONG  = 3
Flag if the current password given was not identical to the real current password
PASSWORD_UPDATED  = 1
Flag if password has been updated

Properties

$content  : string
$eventDispatcher  : EventDispatcherInterface
$formProtection  : AbstractFormProtection
Form protection instance
$iconFactory  : IconFactory
$languageServiceFactory  : LanguageServiceFactory
$languageUpdate  : bool
$mfaProviderRegistry  : MfaProviderRegistry
$moduleName  : string
The name of the module
$moduleTemplate  : ModuleTemplate
ModuleTemplate object
$moduleTemplateFactory  : ModuleTemplateFactory
$overrideConf  : array<string|int, mixed>
$pageRenderer  : PageRenderer
$pagetreeNeedsRefresh  : bool
$passwordIsSubmitted  : bool
$passwordIsUpdated  : int
$saveData  : bool
$settingsAreResetToDefault  : bool
$setupIsUpdated  : bool
$tsFieldConf  : array<string|int, mixed>

Methods

__construct()  : mixed
mainAction()  : ResponseInterface
Injects the request object, checks if data should be saved, and prepares a HTML page
renderStartModuleSelect()  : string
Returns a select with all modules for startup.
addFlashMessages()  : mixed
Add FlashMessages for various actions
buildInstructionDataTag()  : string
checkAccess()  : bool
Returns access check (currently only "admin" is supported)
enqueueFlashMessages()  : mixed
getAvatarFileUid()  : int
Get Avatar fileUid
getBackendUser()  : BackendUserAuthentication
Returns the current BE user.
getButtons()  : void
Create the panel of buttons for submitting the form or otherwise perform operations.
getCSH()  : string
Returns the CSH Icon for given string
getFieldsFromShowItem()  : array<string|int, string>
Returns array with fields defined in $GLOBALS['TYPO3_USER_SETTINGS']['showitem'] Remove fields which are disabled by user TSconfig
getFlashMessage()  : FlashMessage
getLabel()  : string
Returns the label $str from getLL() and grays out the value if the $str/$key is found in $this->overrideConf array
getLanguageService()  : LanguageService
initialize()  : mixed
Initializes the module for display of the settings form.
processAdditionalJavaScriptModules()  : void
renderLanguageSelect()  : string
Return a select with available languages.
renderUserSetup()  : array<string|int, mixed>
renders the data for all tabs in the user setup and returns everything that is needed with tabs and dyntab menu
setAvatarFileUid()  : mixed
Set avatar fileUid for backend user
storeIncomingData()  : mixed
If settings are submitted to _POST[DATA], store them NOTICE: This method is called before the \TYPO3\CMS\Backend\Template\ModuleTemplate is included. See bottom of document.

Constants

PASSWORD_NOT_THE_SAME

Flag if both new passwords do not match

public mixed PASSWORD_NOT_THE_SAME = 2

PASSWORD_NOT_UPDATED

Flag if password has not been updated

public mixed PASSWORD_NOT_UPDATED = 0

PASSWORD_OLD_WRONG

Flag if the current password given was not identical to the real current password

public mixed PASSWORD_OLD_WRONG = 3

PASSWORD_UPDATED

Flag if password has been updated

public mixed PASSWORD_UPDATED = 1

Properties

$eventDispatcher

protected EventDispatcherInterface $eventDispatcher

$languageUpdate

protected bool $languageUpdate

$moduleName

The name of the module

protected string $moduleName = 'user_setup'

$overrideConf

protected array<string|int, mixed> $overrideConf

$pagetreeNeedsRefresh

protected bool $pagetreeNeedsRefresh = false

$passwordIsSubmitted

protected bool $passwordIsSubmitted = false

$passwordIsUpdated

protected int $passwordIsUpdated = self::PASSWORD_NOT_UPDATED

$settingsAreResetToDefault

protected bool $settingsAreResetToDefault = false

$setupIsUpdated

protected bool $setupIsUpdated = false

$tsFieldConf

protected array<string|int, mixed> $tsFieldConf

Methods

__construct()

public __construct(EventDispatcherInterface $eventDispatcher, MfaProviderRegistry $mfaProviderRegistry, IconFactory $iconFactory, PageRenderer $pageRenderer, ModuleTemplateFactory $moduleTemplateFactory, LanguageServiceFactory $languageServiceFactory) : mixed
Parameters
$eventDispatcher : EventDispatcherInterface
$mfaProviderRegistry : MfaProviderRegistry
$iconFactory : IconFactory
$pageRenderer : PageRenderer
$moduleTemplateFactory : ModuleTemplateFactory
$languageServiceFactory : LanguageServiceFactory

mainAction()

Injects the request object, checks if data should be saved, and prepares a HTML page

public mainAction(ServerRequestInterface $request) : ResponseInterface
Parameters
$request : ServerRequestInterface

the current request

Return values
ResponseInterface

the response with the content

renderStartModuleSelect()

Returns a select with all modules for startup.

public renderStartModuleSelect() : string

This method is called from the setup module fake TCA userFunc.

Return values
string

Complete select as HTML string

addFlashMessages()

Add FlashMessages for various actions

protected addFlashMessages() : mixed

buildInstructionDataTag()

protected buildInstructionDataTag(string $dispatchAction) : string
Parameters
$dispatchAction : string
Return values
string

checkAccess()

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

protected checkAccess(array<string|int, mixed> $config) : bool
Parameters
$config : array<string|int, mixed>

Configuration of the field, access mode is defined in key 'access'

Return values
bool

Whether it is allowed to modify the given field

enqueueFlashMessages()

protected enqueueFlashMessages(array<string|int, mixed> $flashMessages) : mixed
Parameters
$flashMessages : array<string|int, mixed>
Tags
throws
Exception

getAvatarFileUid()

Get Avatar fileUid

protected getAvatarFileUid(int $beUserId) : int
Parameters
$beUserId : int
Return values
int

getButtons()

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

protected getButtons() : void

getCSH()

Returns the CSH Icon for given string

protected getCSH(string $str, string $label, string $fieldName) : string
Parameters
$str : string

Locallang key

$label : string

The label to be used, that should be wrapped in help

$fieldName : string

field name

Return values
string

HTML output.

getFieldsFromShowItem()

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

protected getFieldsFromShowItem() : array<string|int, string>
Return values
array<string|int, string>

Array with field names visible in form

getFlashMessage()

protected getFlashMessage(string $message, string $title[, int $severity = FlashMessage::OK ]) : FlashMessage
Parameters
$message : string
$title : string
$severity : int = FlashMessage::OK
Return values
FlashMessage

getLabel()

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

protected getLabel(string $str[, string $key = '' ][, bool $addLabelTag = true ]) : string
Parameters
$str : string

Locallang key

$key : string = ''

Alternative override-config key

$addLabelTag : bool = true

Defines whether the string should be wrapped in a

Return values
string

HTML output.

initialize()

Initializes the module for display of the settings form.

protected initialize(ServerRequestInterface $request) : mixed
Parameters
$request : ServerRequestInterface

processAdditionalJavaScriptModules()

protected processAdditionalJavaScriptModules() : void

renderLanguageSelect()

Return a select with available languages.

protected renderLanguageSelect() : string

This method is called from the setup module fake TCA userFunc.

Return values
string

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

renderUserSetup()

renders the data for all tabs in the user setup and returns everything that is needed with tabs and dyntab menu

protected renderUserSetup() : array<string|int, mixed>
Return values
array<string|int, mixed>

Ready to use for the dyntabmenu itemarray

setAvatarFileUid()

Set avatar fileUid for backend user

protected setAvatarFileUid(int $beUserId, numeric-string|""|"delete" $fileUid, array<string|int, mixed> &$storeRec) : mixed
Parameters
$beUserId : int
$fileUid : numeric-string|""|"delete"

either a file UID, an empty string, or delete

$storeRec : array<string|int, mixed>

storeIncomingData()

If settings are submitted to _POST[DATA], store them NOTICE: This method is called before the \TYPO3\CMS\Backend\Template\ModuleTemplate is included. See bottom of document.

protected storeIncomingData(array<string|int, mixed> $postData) : mixed
Parameters
$postData : array<string|int, mixed>

parsed body of the request


        
On this page

Search results