‪TYPO3CMS  10.4
SetupModuleController.php
Go to the documentation of this file.
1 <?php
2 
3 /*
4  * This file is part of the TYPO3 CMS project.
5  *
6  * It is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU General Public License, either version 2
8  * of the License, or any later version.
9  *
10  * For the full copyright and license information, please read the
11  * LICENSE.txt file that was distributed with this source code.
12  *
13  * The TYPO3 project - inspiring people to share!
14  */
15 
17 
18 use Psr\EventDispatcher\EventDispatcherInterface;
19 use Psr\Http\Message\ResponseInterface;
20 use Psr\Http\Message\ServerRequestInterface;
43 use ‪TYPO3\CMS\Core\SysLog\Action\Setting as SystemLogSettingAction;
44 use ‪TYPO3\CMS\Core\SysLog\Error as SystemLogErrorClassification;
45 use ‪TYPO3\CMS\Core\SysLog\Type as SystemLogType;
48 
55 {
56 
61 
66 
71 
77 
81  protected ‪$content;
82 
86  protected ‪$overrideConf;
87 
91  protected ‪$languageUpdate;
92 
96  protected ‪$pagetreeNeedsRefresh = false;
97 
101  protected ‪$tsFieldConf;
102 
106  protected ‪$saveData = false;
107 
112 
116  protected ‪$passwordIsSubmitted = false;
117 
121  protected ‪$setupIsUpdated = false;
122 
126  protected ‪$settingsAreResetToDefault = false;
127 
133  protected ‪$formProtection;
134 
140  protected ‪$moduleName = 'user_setup';
141 
147  protected ‪$moduleTemplate;
148 
152  protected ‪$eventDispatcher;
153 
159  public function ‪__construct(EventDispatcherInterface ‪$eventDispatcher)
160  {
161  $this->eventDispatcher = ‪$eventDispatcher;
162  $this->moduleTemplate = GeneralUtility::makeInstance(ModuleTemplate::class);
163  $this->formProtection = ‪FormProtectionFactory::get();
164  $pageRenderer = $this->moduleTemplate->getPageRenderer();
165  $pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/Modal');
166  $pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/FormEngine');
167  $pageRenderer->loadRequireJsModule('TYPO3/CMS/Setup/SetupModule');
168  $this->‪processAdditionalJavaScriptModules($pageRenderer);
169  $pageRenderer->addInlineSetting('FormEngine', 'formName', 'editform');
170  $pageRenderer->addInlineLanguageLabelArray([
171  'FormEngine.remainingCharacters' => $this->‪getLanguageService()->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.remainingCharacters'),
172  ]);
173  $pageRenderer->addJsFile('EXT:backend/Resources/Public/JavaScript/md5.js');
174  }
175 
176  protected function ‪processAdditionalJavaScriptModules(‪PageRenderer $pageRenderer): void
177  {
178  $event = new ‪AddJavaScriptModulesEvent();
180  $event = $this->eventDispatcher->dispatch($event);
181  foreach ($event->getModules() as ‪$moduleName) {
182  $pageRenderer->‪loadRequireJsModule(‪$moduleName);
183  }
184  }
185 
189  protected function ‪initialize()
190  {
191  $this->‪getLanguageService()->‪includeLLFile('EXT:setup/Resources/Private/Language/locallang.xlf');
192  $this->moduleTemplate->setTitle($this->‪getLanguageService()->getLL('UserSettings'));
193  // Getting the 'override' values as set might be set in User TSconfig
194  $this->overrideConf = $this->‪getBackendUser()->‪getTSConfig()['setup.']['override.'] ?? null;
195  // Getting the disabled fields might be set in User TSconfig (eg setup.fields.password.disabled=1)
196  $this->tsFieldConf = $this->‪getBackendUser()->‪getTSConfig()['setup.']['fields.'] ?? null;
197  // id password is disabled, disable repeat of password too (password2)
198  if ($this->tsFieldConf['password.']['disabled'] ?? false) {
199  $this->tsFieldConf['password2.']['disabled'] = 1;
200  $this->tsFieldConf['passwordCurrent.']['disabled'] = 1;
201  }
202  }
203 
211  protected function ‪storeIncomingData(array $postData)
212  {
213  // First check if something is submitted in the data-array from POST vars
214  $d = $postData['data'] ?? null;
215  $columns = ‪$GLOBALS['TYPO3_USER_SETTINGS']['columns'];
216  $backendUser = $this->‪getBackendUser();
217  $beUserId = $backendUser->user['uid'];
218  $storeRec = [];
219  $fieldList = $this->‪getFieldsFromShowItem();
220  if (is_array($d) && $this->formProtection->validateToken((string)($postData['formToken'] ?? ''), 'BE user setup', 'edit')) {
221  // UC hashed before applying changes
222  $save_before = md5(serialize($backendUser->uc));
223  // PUT SETTINGS into the ->uc array:
224  // Reload left frame when switching BE language
225  if (isset($d['lang']) && $d['lang'] !== $backendUser->uc['lang']) {
226  $this->languageUpdate = true;
227  }
228  // Reload pagetree if the title length is changed
229  if (isset($d['titleLen']) && $d['titleLen'] !== $backendUser->uc['titleLen']) {
230  $this->pagetreeNeedsRefresh = true;
231  }
232  if ($d['setValuesToDefault']) {
233  // If every value should be default
234  $backendUser->resetUC();
235  $this->settingsAreResetToDefault = true;
236  } elseif ($d['save']) {
237  // Save all submitted values if they are no array (arrays are with table=be_users) and exists in $GLOBALS['TYPO3_USER_SETTINGS'][columns]
238  foreach ($columns as $field => $config) {
239  if (!in_array($field, $fieldList, true)) {
240  continue;
241  }
242  if ($config['table']) {
243  if ($config['table'] === 'be_users' && !in_array($field, ['password', 'password2', 'passwordCurrent', 'email', 'realName', 'admin', 'avatar'], true)) {
244  if (!isset($config['access']) || $this->‪checkAccess($config) && $backendUser->user[$field] !== $d['be_users'][$field]) {
245  if ($config['type'] === 'check') {
246  $fieldValue = isset($d['be_users'][$field]) ? 1 : 0;
247  } else {
248  $fieldValue = $d['be_users'][$field];
249  }
250  $storeRec['be_users'][$beUserId][$field] = $fieldValue;
251  $backendUser->user[$field] = $fieldValue;
252  }
253  }
254  }
255  if ($config['type'] === 'check') {
256  $backendUser->uc[$field] = isset($d[$field]) ? 1 : 0;
257  } else {
258  $backendUser->uc[$field] = htmlspecialchars($d[$field]);
259  }
260  }
261  // Personal data for the users be_user-record (email, name, password...)
262  // If email and name is changed, set it in the users record:
263  $be_user_data = $d['be_users'];
264  // Possibility to modify the transmitted values. Useful to do transformations, like RSA password decryption
265  foreach (‪$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/setup/mod/index.php']['modifyUserDataBeforeSave'] ?? [] as $function) {
266  $params = ['be_user_data' => &$be_user_data];
267  GeneralUtility::callUserFunction($function, $params, $this);
268  }
269  $this->passwordIsSubmitted = (string)$be_user_data['password'] !== '';
270  $passwordIsConfirmed = $this->passwordIsSubmitted && $be_user_data['password'] === $be_user_data['password2'];
271  // Update the real name:
272  if (isset($be_user_data['realName']) && $be_user_data['realName'] !== $backendUser->user['realName']) {
273  $backendUser->user['realName'] = ($storeRec['be_users'][$beUserId]['realName'] = substr($be_user_data['realName'], 0, 80));
274  }
275  // Update the email address:
276  if (isset($be_user_data['email']) && $be_user_data['email'] !== $backendUser->user['email']) {
277  $backendUser->user['email'] = ($storeRec['be_users'][$beUserId]['email'] = substr($be_user_data['email'], 0, 255));
278  }
279  // Update the password:
280  if ($passwordIsConfirmed) {
281  if ($backendUser->isAdmin()) {
282  $passwordOk = true;
283  } else {
284  $currentPasswordHashed = $backendUser->user['password'];
285  $passwordOk = false;
286  $saltFactory = GeneralUtility::makeInstance(PasswordHashFactory::class);
287  try {
288  $hashInstance = $saltFactory->get($currentPasswordHashed, 'BE');
289  $passwordOk = $hashInstance->checkPassword($be_user_data['passwordCurrent'], $currentPasswordHashed);
290  } catch (InvalidPasswordHashException $e) {
291  // Could not find hash class responsible for existing password. This is a
292  // misconfiguration and user can not change its password.
293  }
294  }
295  if ($passwordOk) {
296  $this->passwordIsUpdated = ‪self::PASSWORD_UPDATED;
297  $storeRec['be_users'][$beUserId]['password'] = $be_user_data['password'];
298  } else {
299  $this->passwordIsUpdated = ‪self::PASSWORD_OLD_WRONG;
300  }
301  } else {
302  $this->passwordIsUpdated = ‪self::PASSWORD_NOT_THE_SAME;
303  }
304 
305  $this->‪setAvatarFileUid($beUserId, $be_user_data['avatar'], $storeRec);
306 
307  $this->saveData = true;
308  }
309  // Inserts the overriding values.
310  $backendUser->overrideUC();
311  $save_after = md5(serialize($backendUser->uc));
312  // If something in the uc-array of the user has changed, we save the array...
313  if ($save_before != $save_after) {
314  $backendUser->writeUC($backendUser->uc);
315  $backendUser->writelog(SystemLogType::SETTING, SystemLogSettingAction::CHANGE, SystemLogErrorClassification::MESSAGE, 1, 'Personal settings changed', []);
316  $this->setupIsUpdated = true;
317  }
318  // Persist data if something has changed:
319  if (!empty($storeRec) && $this->saveData) {
320  // Set user to admin to circumvent DataHandler restrictions.
321  // Not using isAdmin() to fetch the original value, just in case it has been boolean casted.
322  $savedUserAdminState = $backendUser->user['admin'];
323  $backendUser->user['admin'] = true;
324  // Make dedicated instance of TCE for storing the changes.
325  $dataHandler = GeneralUtility::makeInstance(DataHandler::class);
326  $dataHandler->start($storeRec, [], $backendUser);
327  // This is to make sure that the users record can be updated even if in another workspace. This is tolerated.
328  $dataHandler->bypassWorkspaceRestrictions = true;
329  $dataHandler->process_datamap();
330  // reset the user record admin flag to previous value, just in case it gets used any further.
331  $backendUser->user['admin'] = $savedUserAdminState;
332  if ($this->passwordIsUpdated === self::PASSWORD_NOT_UPDATED || count($storeRec['be_users'][$beUserId]) > 1) {
333  $this->setupIsUpdated = true;
334  }
335  ‪BackendUtility::setUpdateSignal('updateTopbar');
336  }
337  }
338  }
339 
345  protected function ‪getJavaScript()
346  {
347  $javaScript = '';
348  foreach (‪$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/setup/mod/index.php']['setupScriptHook'] ?? [] as $function) {
349  $params = [];
350  $javaScript .= GeneralUtility::callUserFunction($function, $params, $this);
351  }
352  return $javaScript;
353  }
354 
361  public function ‪mainAction(ServerRequestInterface $request): ResponseInterface
362  {
363  $this->‪initialize();
364  if ($request->getMethod() === 'POST') {
365  $postData = $request->getParsedBody();
366  if (is_array($postData) && !empty($postData)) {
367  $this->‪storeIncomingData($postData);
368  }
369  }
370  if ($this->languageUpdate) {
371  $this->content .= $this->‪buildInstructionDataTag('TYPO3.ModuleMenu.App.refreshMenu');
372  $this->content .= $this->‪buildInstructionDataTag('TYPO3.Backend.Topbar.refresh');
373  }
374  if ($this->pagetreeNeedsRefresh) {
375  ‪BackendUtility::setUpdateSignal('updatePageTree');
376  }
377 
378  $uriBuilder = GeneralUtility::makeInstance(UriBuilder::class);
379  $this->content .= '<form action="' . (string)$uriBuilder->buildUriFromRoute('user_setup') . '" method="post" id="SetupModuleController" name="usersetup" enctype="multipart/form-data">';
380  $this->content .= '<div id="user-setup-wrapper">';
381  $this->content .= $this->moduleTemplate->header($this->‪getLanguageService()->‪getLL('UserSettings'));
382  $this->‪addFlashMessages();
383 
384  $formToken = $this->formProtection->generateToken('BE user setup', 'edit');
385 
386  // Render the menu items
387  $menuItems = $this->‪renderUserSetup();
388  $this->content .= $this->moduleTemplate->getDynamicTabMenu($menuItems, 'user-setup', 1, false, false);
389  $this->content .= '<div>';
390  $this->content .= '<input type="hidden" name="formToken" value="' . htmlspecialchars($formToken) . '" />
391  <input type="hidden" value="1" name="data[save]" />
392  <input type="hidden" name="data[setValuesToDefault]" value="0" id="setValuesToDefault" />';
393  $this->content .= '</div>';
394  // End of wrapper div
395  $this->content .= '</div>';
396  // Setting up the buttons and markers for docheader
397  $this->‪getButtons();
398  // Build the <body> for the module
399  // Renders the module page
400  $this->moduleTemplate->setContent($this->content);
401  $this->content .= '</form>';
402  return new ‪HtmlResponse($this->moduleTemplate->renderContent());
403  }
404 
405  protected function ‪buildInstructionDataTag(string $dispatchAction): string
406  {
407  return sprintf(
408  '<typo3-immediate-action action="%s"></typo3-immediate-action>' . "\n",
409  htmlspecialchars($dispatchAction)
410  );
411  }
412 
416  protected function ‪getButtons()
417  {
418  $buttonBar = $this->moduleTemplate->getDocHeaderComponent()->getButtonBar();
419  $cshButton = $buttonBar->makeHelpButton()
420  ->setModuleName('_MOD_user_setup')
421  ->setFieldName('');
422  $buttonBar->addButton($cshButton);
423 
424  $saveButton = $buttonBar->makeInputButton()
425  ->setName('data[save]')
426  ->setTitle($this->‪getLanguageService()->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:rm.saveDoc'))
427  ->setValue('1')
428  ->setForm('SetupModuleController')
429  ->setShowLabelText(true)
430  ->setIcon($this->moduleTemplate->getIconFactory()->getIcon('actions-document-save', ‪Icon::SIZE_SMALL));
431 
432  $buttonBar->addButton($saveButton);
433  $shortcutButton = $buttonBar->makeShortcutButton()
434  ->setModuleName($this->moduleName);
435  $buttonBar->addButton($shortcutButton);
436  }
437 
438  /******************************
439  *
440  * Render module
441  *
442  ******************************/
443 
450  protected function ‪renderUserSetup()
451  {
452  $backendUser = $this->‪getBackendUser();
453  $uriBuilder = GeneralUtility::makeInstance(UriBuilder::class);
454  $html = '';
455  $result = [];
456  $firstTabLabel = '';
457  $code = [];
458  $fieldArray = $this->‪getFieldsFromShowItem();
459  $tabLabel = '';
460  foreach ($fieldArray as $fieldName) {
461  $config = ‪$GLOBALS['TYPO3_USER_SETTINGS']['columns'][$fieldName];
462  if (isset($config['access']) && !$this->‪checkAccess($config)) {
463  continue;
464  }
465 
466  if (strpos($fieldName, '--div--;') === 0) {
467  if ($firstTabLabel === '') {
468  // First tab
469  $tabLabel = $this->‪getLabel(substr($fieldName, 8), '', false);
470  $firstTabLabel = $tabLabel;
471  } else {
472  $result[] = [
473  'label' => $tabLabel,
474  'content' => count($code) ? implode(LF, $code) : ''
475  ];
476  $tabLabel = $this->‪getLabel(substr($fieldName, 8), '', false);
477  $code = [];
478  }
479  continue;
480  }
481  $label = $this->‪getLabel($config['label'], $fieldName);
482  $label = $this->‪getCSH($config['csh'] ?: $fieldName, $label, $fieldName);
483  $type = $config['type'];
484  $class = $config['class'];
485  if ($type !== 'check') {
486  $class .= ' form-control';
487  }
488  $more = '';
489  if ($class) {
490  $more .= ' class="' . htmlspecialchars($class) . '"';
491  }
492  $style = $config['style'];
493  if ($style) {
494  $more .= ' style="' . htmlspecialchars($style) . '"';
495  }
496  if (isset($this->overrideConf[$fieldName])) {
497  $more .= ' disabled="disabled"';
498  }
499  $value = $config['table'] === 'be_users' ? $backendUser->user[$fieldName] : $backendUser->uc[$fieldName];
500  if (!$value && isset($config['default'])) {
501  $value = $config['default'];
502  }
503  $dataAdd = '';
504  if ($config['table'] === 'be_users') {
505  $dataAdd = '[be_users]';
506  }
507 
508  switch ($type) {
509  case 'text':
510  case 'number':
511  case 'email':
512  case 'password':
513  $noAutocomplete = '';
514 
515  $maxLength = $config['max'] ?? 0;
516  if ((int)$maxLength > 0) {
517  $more .= ' maxlength="' . (int)$maxLength . '"';
518  }
519 
520  if ($type === 'password') {
521  $value = '';
522  $noAutocomplete = 'autocomplete="new-password" ';
523  $more .= ' data-rsa-encryption=""';
524  }
525  $html = '<input aria-labelledby="label_' . htmlspecialchars($fieldName) . '" id="field_' . htmlspecialchars($fieldName) . '"
526  type="' . htmlspecialchars($type) . '"
527  name="data' . $dataAdd . '[' . htmlspecialchars($fieldName) . ']" ' .
528  $noAutocomplete .
529  'value="' . htmlspecialchars($value) . '" ' .
530  $more .
531  ' />';
532  break;
533  case 'check':
534  $html = $label . '<div class="checkbox"><label><input id="field_' . htmlspecialchars($fieldName) . '"
535  type="checkbox"
536  aria-labelledby="label_' . htmlspecialchars($fieldName) . '"
537  name="data' . $dataAdd . '[' . htmlspecialchars($fieldName) . ']"' .
538  ($value ? ' checked="checked"' : '') .
539  $more .
540  ' /></label></div>';
541  $label = '';
542  break;
543  case 'select':
544  if ($config['itemsProcFunc']) {
545  $html = GeneralUtility::callUserFunction($config['itemsProcFunc'], $config, $this);
546  } else {
547  $html = '<select id="field_' . htmlspecialchars($fieldName) . '"
548  aria-labelledby="label_' . htmlspecialchars($fieldName) . '"
549  name="data' . $dataAdd . '[' . htmlspecialchars($fieldName) . ']"' .
550  $more . '>' . LF;
551  foreach ($config['items'] as $key => $optionLabel) {
552  $html .= '<option value="' . htmlspecialchars($key) . '"' . ($value == $key ? ' selected="selected"' : '') . '>' . $this->‪getLabel($optionLabel, '', false) . '</option>' . LF;
553  }
554  $html .= '</select>';
555  }
556  break;
557  case 'user':
558  $html = GeneralUtility::callUserFunction($config['userFunc'], $config, $this);
559  break;
560  case 'button':
561  if (!empty($config['clickData'])) {
562  $clickData = $config['clickData'];
563  $buttonAttributes = [
564  'type' => 'button',
565  'class' => 'btn btn-default',
566  'aria-labelledby' => 'label_' . htmlspecialchars($fieldName),
567  'value' => $this->‪getLabel($config['buttonlabel'], '', false),
568  ];
569  if (isset($clickData['eventName'])) {
570  $buttonAttributes['data-event'] = 'click';
571  $buttonAttributes['data-event-name'] = htmlspecialchars($clickData['eventName']);
572  $buttonAttributes['data-event-payload'] = htmlspecialchars($fieldName);
573  }
574  $html = '<br><input '
575  . GeneralUtility::implodeAttributes($buttonAttributes, false) . ' />';
576  } elseif (!empty($config['onClick'])) {
580  $onClick = $config['onClick'];
581  if ($config['onClickLabels']) {
582  foreach ($config['onClickLabels'] as $key => $labelclick) {
583  $config['onClickLabels'][$key] = $this->‪getLabel($labelclick, '', false);
584  }
585  $onClick = vsprintf($onClick, $config['onClickLabels']);
586  }
587  $html = '<br><input class="btn btn-default" type="button"
588  aria-labelledby="label_' . htmlspecialchars($fieldName) . '"
589  value="' . $this->‪getLabel($config['buttonlabel'], '', false) . '"
590  onclick="' . $onClick . '" />';
591  }
592  if (!empty($config['confirm'])) {
593  $confirmData = $config['confirmData'];
594  // cave: values must be processed by `htmlspecialchars()`
595  $buttonAttributes = [
596  'type' => 'button',
597  'class' => 'btn btn-default t3js-modal-trigger',
598  'data-severity' => 'warning',
599  'data-title' => $this->‪getLabel($config['label'], '', false),
600  'data-content' => $this->‪getLabel($confirmData['message'], '', false),
601  'value' => htmlspecialchars($this->‪getLabel($config['buttonlabel'], '', false)),
602  ];
603  if (isset($confirmData['eventName'])) {
604  $buttonAttributes['data-event'] = 'confirm';
605  $buttonAttributes['data-event-name'] = htmlspecialchars($confirmData['eventName']);
606  $buttonAttributes['data-event-payload'] = htmlspecialchars($fieldName);
607  }
608  if (isset($confirmData['jsCodeAfterOk'])) {
612  $buttonAttributes['data-href'] = 'javascript:' . htmlspecialchars($confirmData['jsCodeAfterOk']);
613  }
614  $html = '<br><input '
615  . GeneralUtility::implodeAttributes($buttonAttributes, false) . ' />';
616  }
617  break;
618  case 'avatar':
619  // Get current avatar image
620  $html = '<br>';
621  $avatarFileUid = $this->‪getAvatarFileUid($backendUser->user['uid']);
622 
623  if ($avatarFileUid) {
624  $defaultAvatarProvider = GeneralUtility::makeInstance(DefaultAvatarProvider::class);
625  $avatarImage = $defaultAvatarProvider->getImage($backendUser->user, 32);
626  if ($avatarImage) {
627  $icon = '<span class="avatar"><span class="avatar-image">' .
628  '<img alt="" src="' . htmlspecialchars($avatarImage->getUrl(true)) . '"' .
629  ' width="' . (int)$avatarImage->getWidth() . '" ' .
630  'height="' . (int)$avatarImage->getHeight() . '" />' .
631  '</span></span>';
632  $html .= '<span class="pull-left" style="padding-right: 10px" id="image_' . htmlspecialchars($fieldName) . '">' . $icon . ' </span>';
633  }
634  }
635  $html .= '<input id="field_' . htmlspecialchars($fieldName) . '" type="hidden" ' .
636  'name="data' . $dataAdd . '[' . htmlspecialchars($fieldName) . ']"' . $more .
637  ' value="' . (int)$avatarFileUid . '" data-setup-avatar-field="' . htmlspecialchars($fieldName) . '" />';
638 
639  $html .= '<div class="btn-group">';
640  $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
641  if ($avatarFileUid) {
642  $html .=
643  '<button type="button" id="clear_button_' . htmlspecialchars($fieldName) . '" aria-label="' . htmlspecialchars($this->‪getLanguageService()->getLL('avatar.clear')) . '" '
644  . ' class="btn btn-default">'
645  . $iconFactory->getIcon('actions-delete', ‪Icon::SIZE_SMALL)
646  . '</button>';
647  }
648  $html .=
649  '<button type="button" id="add_button_' . htmlspecialchars($fieldName) . '" class="btn btn-default btn-add-avatar"'
650  . ' aria-label="' . htmlspecialchars($this->‪getLanguageService()->getLL('avatar.openFileBrowser')) . '"'
651  . ' data-setup-avatar-url="' . htmlspecialchars((string)$uriBuilder->buildUriFromRoute('wizard_element_browser', ['mode' => 'file', 'bparams' => '||||__IDENTIFIER__'])) . '"'
652  . '>' . $iconFactory->getIcon('actions-insert-record', ‪Icon::SIZE_SMALL)
653  . '</button></div>';
654  break;
655  default:
656  $html = '';
657  }
658 
659  $code[] = '<div class="form-section"><div class="row"><div class="form-group t3js-formengine-field-item col-md-12">' .
660  $label .
661  $html .
662  '</div></div></div>';
663  }
664 
665  $result[] = [
666  'label' => $tabLabel,
667  'content' => count($code) ? implode(LF, $code) : ''
668  ];
669  return $result;
670  }
671 
678  public function ‪renderLanguageSelect()
679  {
680  $backendUser = $this->‪getBackendUser();
681  $language = $this->‪getLanguageService();
682  $languageOptions = [];
683  // Compile the languages dropdown
684  $langDefault = htmlspecialchars($language->getLL('lang_default'));
685  $languageOptions[$langDefault] = '<option value=""' . ($backendUser->uc['lang'] === '' ? ' selected="selected"' : '') . '>' . $langDefault . '</option>';
686  if (isset(‪$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['lang']['availableLanguages'])) {
687  // Traverse the number of languages
688  ‪$locales = GeneralUtility::makeInstance(Locales::class);
689  $languages = ‪$locales->getLanguages();
690 
691  foreach ($languages as $locale => $name) {
692  if ($locale !== 'default') {
693  $defaultName = isset(‪$GLOBALS['LOCAL_LANG']['default']['lang_' . $locale]) ? ‪$GLOBALS['LOCAL_LANG']['default']['lang_' . $locale][0]['source'] : $name;
694  $localizedName = htmlspecialchars($language->getLL('lang_' . $locale));
695  if ($localizedName === '') {
696  $localizedName = htmlspecialchars($name);
697  }
698  $localLabel = ' - [' . htmlspecialchars($defaultName) . ']';
699  $available = in_array($locale, ‪$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['lang']['availableLanguages'], true) || is_dir(‪Environment::getLabelsPath() . '/' . $locale);
700  if ($available) {
701  $languageOptions[$defaultName] = '<option value="' . $locale . '"' . ($backendUser->uc['lang'] === $locale ? ' selected="selected"' : '') . '>' . $localizedName . $localLabel . '</option>';
702  }
703  }
704  }
705  }
706  ksort($languageOptions);
707  $languageCode = '
708  <select aria-labelledby="label_lang" id="field_lang" name="data[lang]" class="form-control">' . implode('', $languageOptions) . '
709  </select>';
710  if ($backendUser->uc['lang'] && !@is_dir(‪Environment::getLabelsPath() . '/' . $backendUser->uc['lang'])) {
711  $languageUnavailableWarning = htmlspecialchars(sprintf($language->getLL('languageUnavailable'), $language->getLL('lang_' . $backendUser->uc['lang']))) . '&nbsp;&nbsp;<br />&nbsp;&nbsp;' . htmlspecialchars($language->getLL('languageUnavailable.' . ($backendUser->isAdmin() ? 'admin' : 'user')));
712  $languageCode = '<br /><span class="label label-danger">' . $languageUnavailableWarning . '</span><br /><br />' . $languageCode;
713  }
714  return $languageCode;
715  }
716 
723  public function ‪renderStartModuleSelect()
724  {
725  // Load available backend modules
726  $loadModules = GeneralUtility::makeInstance(ModuleLoader::class);
727  $loadModules->observeWorkspaces = true;
728  $loadModules->load(‪$GLOBALS['TBE_MODULES']);
729  $startModuleSelect = '<option value="">' . htmlspecialchars($this->‪getLanguageService()->getLL('startModule.firstInMenu')) . '</option>';
730  foreach ($loadModules->modules as $mainMod => $modData) {
731  $hasSubmodules = !empty($modData['sub']) && is_array($modData['sub']);
732  $isStandalone = $modData['standalone'] ?? false;
733  if ($hasSubmodules || $isStandalone) {
734  $modules = '';
735  if (($hasSubmodules)) {
736  foreach ($modData['sub'] as $subData) {
737  $modName = $subData['name'];
738  $modules .= '<option value="' . htmlspecialchars($modName) . '"';
739  $modules .= $this->‪getBackendUser()->uc['startModule'] === $modName ? ' selected="selected"' : '';
740  $modules .= '>' . htmlspecialchars($this->‪getLanguageService()->sL($loadModules->getLabelsForModule($modName)['title'])) . '</option>';
741  }
742  } elseif ($isStandalone) {
743  $modName = $modData['name'];
744  $modules .= '<option value="' . htmlspecialchars($modName) . '"';
745  $modules .= $this->‪getBackendUser()->uc['startModule'] === $modName ? ' selected="selected"' : '';
746  $modules .= '>' . htmlspecialchars($this->‪getLanguageService()->sL($loadModules->getLabelsForModule($modName)['title'])) . '</option>';
747  }
748  $groupLabel = htmlspecialchars($this->‪getLanguageService()->sL($loadModules->getLabelsForModule($mainMod)['title']));
749  $startModuleSelect .= '<optgroup label="' . htmlspecialchars($groupLabel) . '">' . $modules . '</optgroup>';
750  }
751  }
752  return '<select id="field_startModule" aria-labelledby="label_startModule" name="data[startModule]" class="form-control">' . $startModuleSelect . '</select>';
753  }
754 
761  protected function ‪checkAccess(array $config)
762  {
763  $access = $config['access'];
764  if (isset(‪$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['setup']['accessLevelCheck'][$access])) {
765  if (class_exists($access)) {
766  $accessObject = GeneralUtility::makeInstance($access);
767  if (method_exists($accessObject, 'accessLevelCheck')) {
768  // Initialize vars. If method fails, $set will be set to FALSE
769  return $accessObject->accessLevelCheck($config);
770  }
771  }
772  } elseif ($access === 'admin') {
773  return $this->‪getBackendUser()->‪isAdmin();
774  }
775 
776  return false;
777  }
778 
787  protected function ‪getLabel($str, $key = '', $addLabelTag = true)
788  {
789  if (strpos($str, 'LLL:') === 0) {
790  $out = htmlspecialchars($this->‪getLanguageService()->sL($str));
791  } else {
792  $out = htmlspecialchars($str);
793  }
794  if (isset($this->overrideConf[$key ?: $str])) {
795  $out = '<span style="color:#999999">' . $out . '</span>';
796  }
797  if ($addLabelTag) {
798  $out = '<label>' . $out . '</label>';
799  }
800  return $out;
801  }
802 
811  protected function ‪getCSH($str, $label, $fieldName)
812  {
813  $context = '_MOD_user_setup';
814  $field = $str;
815  $strParts = explode(':', $str);
816  if (count($strParts) > 1) {
817  // Setting comes from another extension
818  $context = $strParts[0];
819  $field = $strParts[1];
820  } elseif ($str !== 'language' && $str !== 'reset') {
821  $field = 'option_' . $str;
822  }
823  return '<span id="label_' . htmlspecialchars($fieldName) . '">' . ‪BackendUtility::wrapInHelp($context, $field, $label) . '</span>';
824  }
825 
832  protected function ‪getFieldsFromShowItem()
833  {
834  $allowedFields = ‪GeneralUtility::trimExplode(',', ‪$GLOBALS['TYPO3_USER_SETTINGS']['showitem'], true);
835  if ($this->‪getBackendUser()->isAdmin()) {
836  // Do not ask for current password if admin (unknown for other users and no security gain)
837  $key = array_search('passwordCurrent', $allowedFields);
838  if ($key !== false) {
839  unset($allowedFields[$key]);
840  }
841  }
842 
843  $backendUser = $this->‪getBackendUser();
844  $systemMaintainers = array_map('intval', ‪$GLOBALS['TYPO3_CONF_VARS']['SYS']['systemMaintainers'] ?? []);
845  $isCurrentUserInSystemMaintainerList = in_array((int)$backendUser->user['uid'], $systemMaintainers, true);
846  $isInSimulateUserMode = (int)$backendUser->user['ses_backuserid'] !== 0;
847  ‪if ($isInSimulateUserMode && $isCurrentUserInSystemMaintainerList) {
848  // DataHandler denies changing password of system maintainer users in switch user mode.
849  // Do not show the password fields is this case.
850  $key = array_search('password', $allowedFields);
851  if ($key !== false) {
852  unset($allowedFields[$key]);
853  }
854  $key = array_search('password2', $allowedFields);
855  if ($key !== false) {
856  unset($allowedFields[$key]);
857  }
858  }
859 
860  if (!is_array($this->tsFieldConf)) {
861  return $allowedFields;
862  }
863  foreach ($this->tsFieldConf as $fieldName => $userTsFieldConfig) {
864  if (!empty($userTsFieldConfig['disabled'])) {
865  $fieldName = rtrim($fieldName, '.');
866  $key = array_search($fieldName, $allowedFields);
867  if ($key !== false) {
868  unset($allowedFields[$key]);
869  }
870  }
871  }
872  return $allowedFields;
873  }
874 
881  protected function ‪getAvatarFileUid($beUserId)
882  {
883  $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('sys_file_reference');
884  $file = $queryBuilder
885  ->select('uid_local')
886  ->from('sys_file_reference')
887  ->where(
888  $queryBuilder->expr()->eq(
889  'tablenames',
890  $queryBuilder->createNamedParameter('be_users', \PDO::PARAM_STR)
891  ),
892  $queryBuilder->expr()->eq(
893  'fieldname',
894  $queryBuilder->createNamedParameter('avatar', \PDO::PARAM_STR)
895  ),
896  $queryBuilder->expr()->eq(
897  'table_local',
898  $queryBuilder->createNamedParameter('sys_file', \PDO::PARAM_STR)
899  ),
900  $queryBuilder->expr()->eq(
901  'uid_foreign',
902  $queryBuilder->createNamedParameter($beUserId, \PDO::PARAM_INT)
903  )
904  )
905  ->execute()
906  ->fetchColumn();
907  return (int)$file;
908  }
909 
917  protected function ‪setAvatarFileUid($beUserId, $fileUid, array &$storeRec)
918  {
919 
920  // Update is only needed when new fileUid is set
921  if ((int)$fileUid === $this->‪getAvatarFileUid($beUserId)) {
922  return;
923  }
924 
925  // If user is not allowed to modify avatar $fileUid is empty - so don't overwrite existing avatar
926  if (empty($fileUid)) {
927  return;
928  }
929 
930  $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('sys_file_reference');
931  $queryBuilder->getRestrictions()->removeAll();
932  $queryBuilder
933  ->delete('sys_file_reference')
934  ->where(
935  $queryBuilder->expr()->eq(
936  'tablenames',
937  $queryBuilder->createNamedParameter('be_users', \PDO::PARAM_STR)
938  ),
939  $queryBuilder->expr()->eq(
940  'fieldname',
941  $queryBuilder->createNamedParameter('avatar', \PDO::PARAM_STR)
942  ),
943  $queryBuilder->expr()->eq(
944  'table_local',
945  $queryBuilder->createNamedParameter('sys_file', \PDO::PARAM_STR)
946  ),
947  $queryBuilder->expr()->eq(
948  'uid_foreign',
949  $queryBuilder->createNamedParameter($beUserId, \PDO::PARAM_INT)
950  )
951  )
952  ->execute();
953 
954  // If Avatar is marked for delete => set it to empty string so it will be updated properly
955  if ($fileUid === 'delete') {
956  $fileUid = '';
957  }
958 
959  // Create new reference
960  if ($fileUid) {
961 
962  // Get file object
963  try {
964  $file = GeneralUtility::makeInstance(ResourceFactory::class)->getFileObject($fileUid);
965  } catch (FileDoesNotExistException $e) {
966  $file = false;
967  }
968 
969  // Check if user is allowed to use the image (only when not in simulation mode)
970  if ($file && !$file->getStorage()->checkFileActionPermission('read', $file)) {
971  $file = false;
972  }
973 
974  // Check if extension is allowed
975  if ($file && $file->isImage()) {
976 
977  // Create new file reference
978  $storeRec['sys_file_reference']['NEW1234'] = [
979  'uid_local' => (int)$fileUid,
980  'uid_foreign' => (int)$beUserId,
981  'tablenames' => 'be_users',
982  'fieldname' => 'avatar',
983  'pid' => 0,
984  'table_local' => 'sys_file',
985  ];
986  $storeRec['be_users'][(int)$beUserId]['avatar'] = 'NEW1234';
987  }
988  }
989  }
990 
996  protected function ‪getBackendUser()
997  {
998  return ‪$GLOBALS['BE_USER'];
999  }
1000 
1004  protected function ‪getLanguageService()
1005  {
1006  return ‪$GLOBALS['LANG'];
1007  }
1008 
1012  protected function ‪addFlashMessages()
1013  {
1014  $flashMessages = [];
1015 
1016  // Show if setup was saved
1017  if ($this->setupIsUpdated && !$this->settingsAreResetToDefault) {
1018  $flashMessages[] = $this->‪getFlashMessage('setupWasUpdated', 'UserSettings');
1019  }
1020 
1021  // Show if temporary data was cleared
1022  if ($this->settingsAreResetToDefault) {
1023  $flashMessages[] = $this->‪getFlashMessage('settingsAreReset', 'resetConfiguration');
1024  }
1025 
1026  // Notice
1027  if ($this->setupIsUpdated || $this->settingsAreResetToDefault) {
1028  $flashMessages[] = $this->‪getFlashMessage('activateChanges', '', ‪FlashMessage::INFO);
1029  }
1030 
1031  // If password is updated, output whether it failed or was OK.
1032  if ($this->passwordIsSubmitted) {
1033  switch ($this->passwordIsUpdated) {
1035  $flashMessages[] = $this->‪getFlashMessage('oldPassword_failed', 'newPassword', ‪FlashMessage::ERROR);
1036  break;
1038  $flashMessages[] = $this->‪getFlashMessage('newPassword_failed', 'newPassword', ‪FlashMessage::ERROR);
1039  break;
1041  $flashMessages[] = $this->‪getFlashMessage('newPassword_ok', 'newPassword');
1042  break;
1043  }
1044  }
1045  if (!empty($flashMessages)) {
1046  $this->‪enqueueFlashMessages($flashMessages);
1047  }
1048  }
1049 
1054  protected function ‪enqueueFlashMessages(array $flashMessages)
1055  {
1056  $flashMessageService = GeneralUtility::makeInstance(FlashMessageService::class);
1057  $defaultFlashMessageQueue = $flashMessageService->getMessageQueueByIdentifier();
1058  foreach ($flashMessages as $flashMessage) {
1059  $defaultFlashMessageQueue->enqueue($flashMessage);
1060  }
1061  }
1062 
1069  protected function ‪getFlashMessage($message, $title, $severity = ‪FlashMessage::OK)
1070  {
1071  $title = !empty($title) ? $this->‪getLanguageService()->‪getLL($title) : ' ';
1072  return GeneralUtility::makeInstance(
1073  FlashMessage::class,
1074  $this->‪getLanguageService()->getLL($message),
1075  $title,
1076  $severity
1077  );
1078  }
1079 }
‪TYPO3\CMS\Core\DataHandling\DataHandler
Definition: DataHandler.php:84
‪TYPO3\CMS\Setup\Controller\SetupModuleController\getFieldsFromShowItem
‪string[] getFieldsFromShowItem()
Definition: SetupModuleController.php:818
‪TYPO3\CMS\Core\Imaging\Icon\SIZE_SMALL
‪const SIZE_SMALL
Definition: Icon.php:30
‪TYPO3\CMS\Core\Crypto\PasswordHashing\PasswordHashFactory
Definition: PasswordHashFactory.php:27
‪TYPO3\CMS\Core\FormProtection\FormProtectionFactory\get
‪static TYPO3 CMS Core FormProtection AbstractFormProtection get($classNameOrType='default',... $constructorArguments)
Definition: FormProtectionFactory.php:74
‪TYPO3\CMS\Core\Localization\LanguageService\includeLLFile
‪array includeLLFile($fileRef, $setGlobal=null, $mergeLocalOntoDefault=null)
Definition: LanguageService.php:297
‪TYPO3\CMS\Setup\Controller\SetupModuleController\$content
‪string $content
Definition: SetupModuleController.php:80
‪TYPO3\CMS\Core\Core\Environment\getLabelsPath
‪static string getLabelsPath()
Definition: Environment.php:236
‪TYPO3\CMS\Setup\Controller\SetupModuleController\PASSWORD_OLD_WRONG
‪const PASSWORD_OLD_WRONG
Definition: SetupModuleController.php:76
‪TYPO3\CMS\Core\Imaging\Icon
Definition: Icon.php:26
‪TYPO3\CMS\Setup\Controller\SetupModuleController\getFlashMessage
‪FlashMessage getFlashMessage($message, $title, $severity=FlashMessage::OK)
Definition: SetupModuleController.php:1055
‪TYPO3\CMS\Backend\Utility\BackendUtility\setUpdateSignal
‪static setUpdateSignal($set='', $params='')
Definition: BackendUtility.php:2798
‪TYPO3\CMS\Setup\Controller\SetupModuleController\$overrideConf
‪array $overrideConf
Definition: SetupModuleController.php:84
‪TYPO3\CMS\Setup\Controller\SetupModuleController
Definition: SetupModuleController.php:55
‪TYPO3\CMS\Core\Crypto\PasswordHashing\InvalidPasswordHashException
Definition: InvalidPasswordHashException.php:26
‪TYPO3\CMS\Core\Authentication\BackendUserAuthentication\getTSConfig
‪array getTSConfig()
Definition: BackendUserAuthentication.php:1217
‪if
‪if(PHP_SAPI !=='cli')
Definition: splitAcceptanceTests.php:33
‪TYPO3\CMS\Core\Authentication\BackendUserAuthentication\isAdmin
‪bool isAdmin()
Definition: BackendUserAuthentication.php:292
‪TYPO3\CMS\Setup\Controller\SetupModuleController\$passwordIsUpdated
‪int $passwordIsUpdated
Definition: SetupModuleController.php:104
‪TYPO3\CMS\Setup\Controller\SetupModuleController\$languageUpdate
‪bool $languageUpdate
Definition: SetupModuleController.php:88
‪TYPO3\CMS\Setup\Controller\SetupModuleController\PASSWORD_UPDATED
‪const PASSWORD_UPDATED
Definition: SetupModuleController.php:65
‪TYPO3\CMS\Backend\Backend\Avatar\DefaultAvatarProvider
Definition: DefaultAvatarProvider.php:29
‪TYPO3\CMS\Core\Localization\Locales
Definition: Locales.php:30
‪TYPO3\CMS\Core\Resource\Exception\FileDoesNotExistException
Definition: FileDoesNotExistException.php:22
‪TYPO3\CMS\Core\Imaging\IconFactory
Definition: IconFactory.php:33
‪TYPO3\CMS\Setup\Controller\SetupModuleController\processAdditionalJavaScriptModules
‪processAdditionalJavaScriptModules(PageRenderer $pageRenderer)
Definition: SetupModuleController.php:162
‪TYPO3\CMS\Setup\Controller\SetupModuleController\$moduleTemplate
‪ModuleTemplate $moduleTemplate
Definition: SetupModuleController.php:134
‪TYPO3\CMS\Setup\Controller\SetupModuleController\$setupIsUpdated
‪bool $setupIsUpdated
Definition: SetupModuleController.php:112
‪TYPO3\CMS\Setup\Controller\SetupModuleController\mainAction
‪ResponseInterface mainAction(ServerRequestInterface $request)
Definition: SetupModuleController.php:347
‪TYPO3\CMS\Setup\Controller\SetupModuleController\renderLanguageSelect
‪string renderLanguageSelect()
Definition: SetupModuleController.php:664
‪TYPO3\CMS\Setup\Controller\SetupModuleController\getLabel
‪string getLabel($str, $key='', $addLabelTag=true)
Definition: SetupModuleController.php:773
‪TYPO3\CMS\Backend\Utility\BackendUtility\wrapInHelp
‪static string wrapInHelp($table, $field, $text='', array $overloadHelpText=[])
Definition: BackendUtility.php:2260
‪TYPO3\CMS\Setup\Controller\SetupModuleController\$formProtection
‪TYPO3 CMS Core FormProtection BackendFormProtection $formProtection
Definition: SetupModuleController.php:122
‪TYPO3\CMS\Backend\Template\ModuleTemplate
Definition: ModuleTemplate.php:43
‪TYPO3\CMS\Core\Page\PageRenderer\loadRequireJsModule
‪loadRequireJsModule($mainModuleName, $callBackFunction=null)
Definition: PageRenderer.php:1493
‪TYPO3\CMS\Setup\Controller\SetupModuleController\getJavaScript
‪string getJavaScript()
Definition: SetupModuleController.php:331
‪TYPO3\CMS\Setup\Controller\SetupModuleController\$saveData
‪bool $saveData
Definition: SetupModuleController.php:100
‪TYPO3\CMS\Setup\Controller\SetupModuleController\PASSWORD_NOT_UPDATED
‪const PASSWORD_NOT_UPDATED
Definition: SetupModuleController.php:60
‪TYPO3\CMS\Core\Page\PageRenderer
Definition: PageRenderer.php:42
‪TYPO3\CMS\Core\SysLog\Action\Setting
Definition: Setting.php:24
‪TYPO3\CMS\Setup\Controller\SetupModuleController\$passwordIsSubmitted
‪bool $passwordIsSubmitted
Definition: SetupModuleController.php:108
‪TYPO3\CMS\Setup\Controller\SetupModuleController\getCSH
‪string getCSH($str, $label, $fieldName)
Definition: SetupModuleController.php:797
‪TYPO3\CMS\Setup\Controller\SetupModuleController\$eventDispatcher
‪EventDispatcherInterface $eventDispatcher
Definition: SetupModuleController.php:138
‪TYPO3\CMS\Setup\Controller\SetupModuleController\getBackendUser
‪BackendUserAuthentication getBackendUser()
Definition: SetupModuleController.php:982
‪TYPO3\CMS\Backend\Routing\UriBuilder
Definition: UriBuilder.php:38
‪TYPO3\CMS\Core\Resource\ResourceFactory
Definition: ResourceFactory.php:41
‪$locales
‪$locales
Definition: be_users.php:7
‪TYPO3\CMS\Backend\Module\ModuleLoader
Definition: ModuleLoader.php:34
‪TYPO3\CMS\Core\SysLog\Error
Definition: Error.php:24
‪TYPO3\CMS\Setup\Controller\SetupModuleController\getButtons
‪getButtons()
Definition: SetupModuleController.php:402
‪TYPO3\CMS\Core\Authentication\BackendUserAuthentication
Definition: BackendUserAuthentication.php:62
‪TYPO3\CMS\Setup\Controller\SetupModuleController\renderUserSetup
‪array renderUserSetup()
Definition: SetupModuleController.php:436
‪TYPO3\CMS\Backend\Utility\BackendUtility
Definition: BackendUtility.php:75
‪TYPO3\CMS\Setup\Controller\SetupModuleController\__construct
‪__construct(EventDispatcherInterface $eventDispatcher)
Definition: SetupModuleController.php:145
‪TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode
‪static string[] trimExplode($delim, $string, $removeEmptyValues=false, $limit=0)
Definition: GeneralUtility.php:1059
‪TYPO3\CMS\Core\Messaging\AbstractMessage\OK
‪const OK
Definition: AbstractMessage.php:29
‪TYPO3\CMS\Setup\Controller\SetupModuleController\$moduleName
‪string $moduleName
Definition: SetupModuleController.php:128
‪TYPO3\CMS\Core\Messaging\AbstractMessage\INFO
‪const INFO
Definition: AbstractMessage.php:28
‪TYPO3\CMS\Setup\Controller\SetupModuleController\getLanguageService
‪LanguageService getLanguageService()
Definition: SetupModuleController.php:990
‪TYPO3\CMS\Setup\Controller\SetupModuleController\$settingsAreResetToDefault
‪bool $settingsAreResetToDefault
Definition: SetupModuleController.php:116
‪TYPO3\CMS\Core\Messaging\FlashMessage
Definition: FlashMessage.php:24
‪TYPO3\CMS\Core\FormProtection\FormProtectionFactory
Definition: FormProtectionFactory.php:47
‪$GLOBALS
‪$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules']
Definition: ext_localconf.php:5
‪TYPO3\CMS\Core\Core\Environment
Definition: Environment.php:40
‪TYPO3\CMS\Setup\Controller\SetupModuleController\PASSWORD_NOT_THE_SAME
‪const PASSWORD_NOT_THE_SAME
Definition: SetupModuleController.php:70
‪TYPO3\CMS\Setup\Controller\SetupModuleController\renderStartModuleSelect
‪string renderStartModuleSelect()
Definition: SetupModuleController.php:709
‪TYPO3\CMS\Setup\Controller\SetupModuleController\storeIncomingData
‪storeIncomingData(array $postData)
Definition: SetupModuleController.php:197
‪TYPO3\CMS\Core\Localization\LanguageService
Definition: LanguageService.php:42
‪TYPO3\CMS\Core\Database\ConnectionPool
Definition: ConnectionPool.php:46
‪TYPO3\CMS\Setup\Controller\SetupModuleController\initialize
‪initialize()
Definition: SetupModuleController.php:175
‪TYPO3\CMS\Setup\Controller\SetupModuleController\$pagetreeNeedsRefresh
‪bool $pagetreeNeedsRefresh
Definition: SetupModuleController.php:92
‪TYPO3\CMS\Core\Localization\LanguageService\getLL
‪string getLL($index)
Definition: LanguageService.php:154
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:46
‪TYPO3\CMS\Setup\Controller\SetupModuleController\enqueueFlashMessages
‪enqueueFlashMessages(array $flashMessages)
Definition: SetupModuleController.php:1040
‪TYPO3\CMS\Setup\Controller\SetupModuleController\buildInstructionDataTag
‪buildInstructionDataTag(string $dispatchAction)
Definition: SetupModuleController.php:391
‪TYPO3\CMS\Setup\Controller
Definition: SetupModuleController.php:16
‪TYPO3\CMS\Setup\Controller\SetupModuleController\setAvatarFileUid
‪setAvatarFileUid($beUserId, $fileUid, array &$storeRec)
Definition: SetupModuleController.php:903
‪TYPO3\CMS\Core\Messaging\FlashMessageService
Definition: FlashMessageService.php:27
‪TYPO3\CMS\Core\Messaging\AbstractMessage\ERROR
‪const ERROR
Definition: AbstractMessage.php:31
‪TYPO3\CMS\Setup\Controller\SetupModuleController\$tsFieldConf
‪array $tsFieldConf
Definition: SetupModuleController.php:96
‪TYPO3\CMS\Setup\Controller\SetupModuleController\checkAccess
‪bool checkAccess(array $config)
Definition: SetupModuleController.php:747
‪TYPO3\CMS\Setup\Controller\SetupModuleController\getAvatarFileUid
‪int getAvatarFileUid($beUserId)
Definition: SetupModuleController.php:867
‪TYPO3\CMS\Core\Http\HtmlResponse
Definition: HtmlResponse.php:26
‪TYPO3\CMS\Core\SysLog\Type
Definition: Type.php:24
‪TYPO3\CMS\Setup\Controller\SetupModuleController\addFlashMessages
‪addFlashMessages()
Definition: SetupModuleController.php:998
‪TYPO3\CMS\Setup\Event\AddJavaScriptModulesEvent
Definition: AddJavaScriptModulesEvent.php:24