TYPO3 CMS  TYPO3_7-6
TYPO3\CMS\Setup\Controller\SetupModuleController Class Reference
Inheritance diagram for TYPO3\CMS\Setup\Controller\SetupModuleController:
TYPO3\CMS\Backend\Module\AbstractModule

Public Member Functions

 __construct ()
 
 getFormProtection ()
 
 init ()
 
 main ()
 
 mainAction (ServerRequestInterface $request, ResponseInterface $response)
 
 printContent ()
 
 renderStartModuleSelect ($params, $pObj)
 
 simulateUser ()
 
- Public Member Functions inherited from TYPO3\CMS\Backend\Module\AbstractModule
 __construct ()
 
 processRequest (ServerRequestInterface $request, ResponseInterface $response)
 

Public Attributes

const PASSWORD_NOT_UPDATED = 0
 
const PASSWORD_UPDATED = 1
 
const PASSWORD_NOT_THE_SAME = 2
 
const PASSWORD_OLD_WRONG = 3
 
 $MOD_MENU = []
 
 $MOD_SETTINGS = []
 
 $doc
 
 $content
 
 $overrideConf
 
 $OLD_BE_USER
 
 $languageUpdate
 

Protected Member Functions

 getJavaScript ()
 
 getButtons ()
 
 renderUserSetup ()
 
 getRealScriptUserObj ()
 
 renderSimulateUserSelectAndLabel ()
 
 checkAccess (array $config)
 
 getLabel ($str, $key='', $addLabelTag=true)
 
 getCSH ($str, $label)
 
 getFieldsFromShowItem ()
 
 getAvatarFileUid ($beUserId)
 
 setAvatarFileUid ($beUserId, $fileUid, array &$storeRec)
 
 addAvatarButtonJs ($fieldName)
 
 getBackendUser ()
 
 getLanguageService ()
 
 getDatabaseConnection ()
 
 addFlashMessages ()
 
 enqueueFlashMessages (array $flashMessages)
 
 getFlashMessage ($message, $title, $severity=FlashMessage::OK)
 

Protected Attributes

 $pagetreeNeedsRefresh = false
 
 $isAdmin
 
 $tsFieldConf
 
 $saveData = false
 
 $passwordIsUpdated = self::PASSWORD_NOT_UPDATED
 
 $passwordIsSubmitted = false
 
 $setupIsUpdated = false
 
 $settingsAreResetToDefault = false
 
 $formProtection
 
 $simulateSelector = ''
 
 $simUser
 
 $moduleName = 'user_setup'
 
 $loadModules
 
- Protected Attributes inherited from TYPO3\CMS\Backend\Module\AbstractModule
 $moduleTemplate
 
 $request
 

Detailed Description

Script class for the Setup module

Definition at line 39 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 171 of file SetupModuleController.php.

References TYPO3\CMS\Core\FormProtection\FormProtectionFactory\get().

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

References TYPO3\CMS\Core\Utility\GeneralUtility\quoteJSvalue().

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

◆ addFlashMessages()

◆ checkAccess()

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

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

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

Definition at line 812 of file SetupModuleController.php.

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

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

◆ enqueueFlashMessages()

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

Definition at line 1089 of file SetupModuleController.php.

References TYPO3\CMS\Core\Utility\GeneralUtility\makeInstance().

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

◆ getAvatarFileUid()

◆ 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 456 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()

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

Returns the CSH Icon for given string

Parameters
string$strLocallang key
string$labelThe label to be used, that should be wrapped in help
Returns
string HTML output.

Definition at line 862 of file SetupModuleController.php.

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

◆ getDatabaseConnection()

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

◆ getFieldsFromShowItem()

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

References $GLOBALS, and TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode().

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

◆ getFlashMessage()

TYPO3\CMS\Setup\Controller\SetupModuleController::getFlashMessage (   $message,
  $title,
  $severity = FlashMessage::OK 
)
protected

◆ getFormProtection()

◆ getJavaScript()

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

Generate necessary JavaScript

Returns
string

Definition at line 357 of file SetupModuleController.php.

References $GLOBALS, $params, and TYPO3\CMS\Core\Utility\GeneralUtility\callUserFunction().

◆ getLabel()

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$strLocallang key
string$keyAlternative override-config key
bool$addLabelTagDefines whether the string should be wrapped in a <label> tag.
Returns
string HTML output.

Definition at line 839 of file SetupModuleController.php.

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

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

◆ getLanguageService()

◆ getRealScriptUserObj()

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

Returns the backend user object, either the global OR the $this->OLD_BE_USER which is set during simulate-user operation. Anyway: The REAL user is returned - the one logged in.

Returns
BackendUserAuthentication The REAL user is returned - the one logged in.

Definition at line 670 of file SetupModuleController.php.

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

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

◆ init()

◆ main()

◆ mainAction()

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

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

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

Definition at line 429 of file SetupModuleController.php.

References $GLOBALS, TYPO3\CMS\Setup\Controller\SetupModuleController\init(), TYPO3\CMS\Setup\Controller\SetupModuleController\main(), and TYPO3\CMS\Setup\Controller\SetupModuleController\simulateUser().

◆ printContent()

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

Prints the content / ends page

Returns
void
Deprecated:
since TYPO3 CMS 7, will be removed in TYPO3 CMS 8

Definition at line 447 of file SetupModuleController.php.

References TYPO3\CMS\Setup\Controller\SetupModuleController\$content, and TYPO3\CMS\Core\Utility\GeneralUtility\logDeprecatedFunction().

◆ renderSimulateUserSelectAndLabel()

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

Render simulate user select and label

Returns
string

Definition at line 792 of file SetupModuleController.php.

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

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

◆ renderStartModuleSelect()

TYPO3\CMS\Setup\Controller\SetupModuleController::renderStartModuleSelect (   $params,
  $pObj 
)

Returns a select with all modules for startup

Parameters
array$params
SetupModuleController$pObj
Returns
string Complete select as HTML string

Definition at line 724 of file SetupModuleController.php.

References 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 ( )

Member Data Documentation

◆ $content

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

◆ $doc

TYPO3\CMS\Setup\Controller\SetupModuleController::$doc

Definition at line 75 of file SetupModuleController.php.

◆ $formProtection

TYPO3\CMS\Setup\Controller\SetupModuleController::$formProtection
protected

◆ $isAdmin

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

◆ $languageUpdate

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

Definition at line 97 of file SetupModuleController.php.

◆ $loadModules

TYPO3\CMS\Setup\Controller\SetupModuleController::$loadModules
protected

Definition at line 166 of file SetupModuleController.php.

◆ $MOD_MENU

TYPO3\CMS\Setup\Controller\SetupModuleController::$MOD_MENU = []

Definition at line 65 of file SetupModuleController.php.

◆ $MOD_SETTINGS

TYPO3\CMS\Setup\Controller\SetupModuleController::$MOD_SETTINGS = []

Definition at line 70 of file SetupModuleController.php.

◆ $moduleName

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

Definition at line 161 of file SetupModuleController.php.

◆ $OLD_BE_USER

TYPO3\CMS\Setup\Controller\SetupModuleController::$OLD_BE_USER

Definition at line 92 of file SetupModuleController.php.

◆ $overrideConf

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

Definition at line 85 of file SetupModuleController.php.

◆ $pagetreeNeedsRefresh

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

Definition at line 102 of file SetupModuleController.php.

◆ $passwordIsSubmitted

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

Definition at line 127 of file SetupModuleController.php.

◆ $passwordIsUpdated

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

Definition at line 122 of file SetupModuleController.php.

◆ $saveData

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

Definition at line 117 of file SetupModuleController.php.

◆ $settingsAreResetToDefault

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

Definition at line 137 of file SetupModuleController.php.

◆ $setupIsUpdated

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

Definition at line 132 of file SetupModuleController.php.

◆ $simulateSelector

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

Definition at line 149 of file SetupModuleController.php.

◆ $simUser

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

Definition at line 154 of file SetupModuleController.php.

◆ $tsFieldConf

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

Definition at line 112 of file SetupModuleController.php.

◆ PASSWORD_NOT_THE_SAME

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

◆ PASSWORD_NOT_UPDATED

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

Flag if password has not been updated

Definition at line 44 of file SetupModuleController.php.

◆ PASSWORD_OLD_WRONG

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

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

Definition at line 60 of file SetupModuleController.php.

Referenced by TYPO3\CMS\Setup\Tests\Unit\Controller\SetupModuleControllerTest\addFlashMessagesAddsMessageIfOldPasswordWasWrong().

◆ PASSWORD_UPDATED

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