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.

Attributes
#[AsController]

Table of Contents

Constants

PASSWORD_NOT_THE_SAME  = 2
PASSWORD_NOT_UPDATED  = 0
PASSWORD_OLD_WRONG  = 3
PASSWORD_POLICY_FAILED  = 4
PASSWORD_UPDATED  = 1

Properties

$backendTitleFormatChanged  : bool
$colorSchemeChanged  : bool
$eventDispatcher  : EventDispatcherInterface
$formProtectionFactory  : FormProtectionFactory
$iconFactory  : IconFactory
$languageServiceFactory  : LanguageServiceFactory
$languageUpdate  : bool
$locales  : Locales
$mfaProviderRegistry  : MfaProviderRegistry
$moduleProvider  : ModuleProvider
$moduleTemplateFactory  : ModuleTemplateFactory
$overrideConf  : array<string|int, mixed>
$pageRenderer  : PageRenderer
$pagetreeNeedsRefresh  : bool
$passwordIsSubmitted  : bool
$passwordIsUpdated  : int
$passwordPolicyValidator  : PasswordPolicyValidator
$settingsAreResetToDefault  : bool
$setupIsUpdated  : bool
$themeChanged  : bool
$tsFieldConf  : array<string|int, mixed>
$uriBuilder  : UriBuilder

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()  : void
Add FlashMessages for various actions
checkAccess()  : bool
Returns access check (currently only "admin" is supported)
getAvatarFileUid()  : int
Get Avatar fileUid
getBackendUser()  : BackendUserAuthentication
getButtons()  : void
Create the panel of buttons for submitting the form or otherwise perform operations.
getFieldsFromShowItem()  : array<string|int, string>
Returns array with fields defined in $GLOBALS['TYPO3_USER_SETTINGS']['showitem'] Remove fields which are disabled by user TSconfig
getLabel()  : string
Returns the label $str from sL() and grays out the value if the $str/$key is found in $this->overrideConf array
getLanguageService()  : LanguageService
initialize()  : ModuleTemplate
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()  : void
If settings are submitted via POST, store them

Constants

PASSWORD_NOT_THE_SAME

protected mixed PASSWORD_NOT_THE_SAME = 2

PASSWORD_NOT_UPDATED

protected mixed PASSWORD_NOT_UPDATED = 0

PASSWORD_OLD_WRONG

protected mixed PASSWORD_OLD_WRONG = 3

PASSWORD_POLICY_FAILED

protected mixed PASSWORD_POLICY_FAILED = 4

PASSWORD_UPDATED

protected mixed PASSWORD_UPDATED = 1

Properties

$backendTitleFormatChanged

protected bool $backendTitleFormatChanged = false

$colorSchemeChanged

protected bool $colorSchemeChanged = false

$eventDispatcher read-only

protected EventDispatcherInterface $eventDispatcher

$languageUpdate

protected bool $languageUpdate = false

$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

$themeChanged

protected bool $themeChanged = false

$tsFieldConf

protected array<string|int, mixed> $tsFieldConf = []

Methods

__construct()

public __construct(EventDispatcherInterface $eventDispatcher, MfaProviderRegistry $mfaProviderRegistry, IconFactory $iconFactory, PageRenderer $pageRenderer, ModuleTemplateFactory $moduleTemplateFactory, LanguageServiceFactory $languageServiceFactory, ModuleProvider $moduleProvider, UriBuilder $uriBuilder, FormProtectionFactory $formProtectionFactory, Locales $locales) : mixed
Parameters
$eventDispatcher : EventDispatcherInterface
$mfaProviderRegistry : MfaProviderRegistry
$iconFactory : IconFactory
$pageRenderer : PageRenderer
$moduleTemplateFactory : ModuleTemplateFactory
$languageServiceFactory : LanguageServiceFactory
$moduleProvider : ModuleProvider
$uriBuilder : UriBuilder
$formProtectionFactory : FormProtectionFactory
$locales : Locales

mainAction()

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

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

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

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

getAvatarFileUid()

Get Avatar fileUid

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

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

getLabel()

Returns the label $str from sL() 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) : ModuleTemplate
Parameters
$request : ServerRequestInterface
Return values
ModuleTemplate

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"|null $fileUid, array<string|int, mixed> &$storeRec) : mixed
Parameters
$beUserId : int
$fileUid : numeric-string|""|"delete"|null

either null, a file UID, an empty string, or delete

$storeRec : array<string|int, mixed>

storeIncomingData()

If settings are submitted via POST, store them

protected storeIncomingData(ServerRequestInterface $request) : void
Parameters
$request : ServerRequestInterface

        
On this page

Search results