TYPO3  7.6
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
SetupModuleController Class Reference
Inheritance diagram for SetupModuleController:
AbstractModule

Public Member Functions

 __construct ()
 
 getFormProtection ()
 
 init ()
 
 main ()
 
 mainAction (ServerRequestInterface $request, ResponseInterface $response)
 
 printContent ()
 
 renderStartModuleSelect ($params, $pObj)
 
 simulateUser ()
 
- Public Member Functions inherited from 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 = array()
 
 $MOD_SETTINGS = array()
 
 $doc
 
 $content
 
 $overrideConf
 
 $OLD_BE_USER
 
 $languageUpdate
 

Protected Member Functions

 getJavaScript ()
 
 getButtons ()
 
 renderUserSetup ()
 
 getRealScriptUserObj ()
 
 renderSimulateUserSelectAndLabel ()
 
 checkAccess (array $config)
 
 getLabel ($str, $key= '', $addLabelTag=true, $altLabelTagId= '')
 
 getCSH ($str, $label)
 
 getFieldsFromShowItem ()
 
 getAvatarFileUid ($beUserId)
 
 setAvatarFileUid ($beUserId, $fileUid, array &$storeRec)
 
 addAvatarButtonJs ($fieldName)
 
 getBackendUser ()
 
 getLanguageService ()
 
 getDatabaseConnection ()
 

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 AbstractModule
 $moduleTemplate
 
 $request
 

Detailed Description

Script class for the Setup module

Definition at line 36 of file SetupModuleController.php.

Constructor & Destructor Documentation

__construct ( )

Instantiate the form protection before a simulated user is initialized.

Definition at line 168 of file SetupModuleController.php.

References FormProtectionFactory\get().

Member Function Documentation

addAvatarButtonJs (   $fieldName)
protected

Add JavaScript to for browse files button

Parameters
string$fieldName

Definition at line 992 of file SetupModuleController.php.

References GeneralUtility\quoteJSvalue().

Referenced by SetupModuleController\renderUserSetup().

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

References $GLOBALS, SetupModuleController\$isAdmin, elseif, and GeneralUtility\makeInstance().

Referenced by SetupModuleController\renderUserSetup().

getAvatarFileUid (   $beUserId)
protected
getBackendUser ( )
protected
getButtons ( )
protected

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

Definition at line 484 of file SetupModuleController.php.

References SetupModuleController\getLanguageService(), and Icon\SIZE_SMALL.

Referenced by SetupModuleController\main().

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

References elseif, and GeneralUtility\inList().

Referenced by SetupModuleController\renderUserSetup().

getDatabaseConnection ( )
protected
getFieldsFromShowItem ( )
protected

Returns array with fields defined in $GLOBALS['TYPO3_USER_SETTINGS']['showitem']

Returns
array Array with fieldnames visible in form

Definition at line 910 of file SetupModuleController.php.

References $GLOBALS, and GeneralUtility\trimExplode().

Referenced by SetupModuleController\renderUserSetup().

getFormProtection ( )

Getter for the form protection instance.

Returns

Definition at line 179 of file SetupModuleController.php.

References SetupModuleController\$formProtection.

getJavaScript ( )
protected

Generate necessary JavaScript

Returns
string

Definition at line 347 of file SetupModuleController.php.

References $GLOBALS, and GeneralUtility\callUserFunction().

getLabel (   $str,
  $key = '',
  $addLabelTag = true,
  $altLabelTagId = '' 
)
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.
string$altLabelTagIdAlternative id for use in "for" attribute of <label> tag. By default the $str key is used prepended with "field_".
Returns
string HTML output.

Definition at line 867 of file SetupModuleController.php.

References SetupModuleController\getLanguageService().

Referenced by SetupModuleController\renderUserSetup().

getLanguageService ( )
protected
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 695 of file SetupModuleController.php.

References SetupModuleController\getBackendUser().

Referenced by SetupModuleController\init().

init ( )
main ( )
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 457 of file SetupModuleController.php.

References $GLOBALS, $response, MessageInterface\getBody(), SetupModuleController\init(), SetupModuleController\main(), and SetupModuleController\simulateUser().

printContent ( )

Prints the content / ends page

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

Definition at line 475 of file SetupModuleController.php.

References SetupModuleController\$content, and GeneralUtility\logDeprecatedFunction().

renderSimulateUserSelectAndLabel ( )
protected

Render simulate user select and label

Returns
string

Definition at line 819 of file SetupModuleController.php.

References SetupModuleController\getLanguageService().

Referenced by SetupModuleController\main().

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

References SetupModuleController\getBackendUser(), and SetupModuleController\getLanguageService().

renderUserSetup ( )
protected
setAvatarFileUid (   $beUserId,
  $fileUid,
array &  $storeRec 
)
protected

Set avatar fileUid for backend user

Parameters
int$beUserId
int$fileUid
array$storeRec

Definition at line 940 of file SetupModuleController.php.

References $GLOBALS, SetupModuleController\getAvatarFileUid(), SetupModuleController\getDatabaseConnection(), ResourceFactory\getInstance(), and GeneralUtility\inList().

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)

Returns
void

Definition at line 776 of file SetupModuleController.php.

References $GLOBALS, GeneralUtility\_GP(), BackendUtility\BEenableFields(), SetupModuleController\getBackendUser(), SetupModuleController\getDatabaseConnection(), BackendUtility\getUserNames(), GeneralUtility\makeInstance(), and GeneralUtility\quoteJSvalue().

Referenced by SetupModuleController\mainAction().

Member Data Documentation

$content

Definition at line 77 of file SetupModuleController.php.

Referenced by SetupModuleController\printContent().

$doc

Definition at line 72 of file SetupModuleController.php.

$formProtection
protected

Definition at line 141 of file SetupModuleController.php.

Referenced by SetupModuleController\getFormProtection().

$isAdmin
protected

Definition at line 104 of file SetupModuleController.php.

Referenced by SetupModuleController\checkAccess().

$languageUpdate

Definition at line 94 of file SetupModuleController.php.

$loadModules
protected

Definition at line 163 of file SetupModuleController.php.

$MOD_MENU = array()

Definition at line 62 of file SetupModuleController.php.

$MOD_SETTINGS = array()

Definition at line 67 of file SetupModuleController.php.

$moduleName = 'user_setup'
protected

Definition at line 158 of file SetupModuleController.php.

$OLD_BE_USER

Definition at line 89 of file SetupModuleController.php.

$overrideConf

Definition at line 82 of file SetupModuleController.php.

$pagetreeNeedsRefresh = false
protected

Definition at line 99 of file SetupModuleController.php.

$passwordIsSubmitted = false
protected

Definition at line 124 of file SetupModuleController.php.

$passwordIsUpdated = self::PASSWORD_NOT_UPDATED
protected

Definition at line 119 of file SetupModuleController.php.

$saveData = false
protected

Definition at line 114 of file SetupModuleController.php.

$settingsAreResetToDefault = false
protected

Definition at line 134 of file SetupModuleController.php.

$setupIsUpdated = false
protected

Definition at line 129 of file SetupModuleController.php.

$simulateSelector = ''
protected

Definition at line 146 of file SetupModuleController.php.

$simUser = ''
protected

Definition at line 151 of file SetupModuleController.php.

$tsFieldConf
protected

Definition at line 109 of file SetupModuleController.php.

const PASSWORD_NOT_THE_SAME = 2

Flag if both new passwords do not match

Definition at line 51 of file SetupModuleController.php.

const PASSWORD_NOT_UPDATED = 0

Flag if password has not been updated

Definition at line 41 of file SetupModuleController.php.

const PASSWORD_OLD_WRONG = 3

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

Definition at line 57 of file SetupModuleController.php.

const PASSWORD_UPDATED = 1

Flag if password has been updated

Definition at line 46 of file SetupModuleController.php.