‪TYPO3CMS  9.5
FormEditorController.php
Go to the documentation of this file.
1 <?php
2 declare(strict_types = 1);
4 
5 /*
6  * This file is part of the TYPO3 CMS project.
7  *
8  * It is free software; you can redistribute it and/or modify it under
9  * the terms of the GNU General Public License, either version 2
10  * of the License, or any later version.
11  *
12  * For the full copyright and license information, please read the
13  * LICENSE.txt file that was distributed with this source code.
14  *
15  * The TYPO3 project - inspiring people to share!
16  */
17 
39 
47 {
48 
54  protected ‪$defaultViewObjectName = BackendTemplateView::class;
55 
60 
69  public function ‪indexAction(string $formPersistenceIdentifier, string $prototypeName = null)
70  {
72  $this->view->getModuleTemplate()->setModuleName($this->request->getPluginName() . '_' . $this->request->getControllerName());
73  $this->view->getModuleTemplate()->setFlashMessageQueue($this->controllerContext->getFlashMessageQueue());
74 
75  if (!$this->formPersistenceManager->isAllowedPersistencePath($formPersistenceIdentifier)) {
76  throw new ‪PersistenceManagerException(sprintf('Read "%s" is not allowed', $formPersistenceIdentifier), 1614500662);
77  }
78 
79  if (
80  strpos($formPersistenceIdentifier, 'EXT:') === 0
81  && !$this->formSettings['persistenceManager']['allowSaveToExtensionPaths']
82  ) {
83  throw new ‪PersistenceManagerException('Edit a extension formDefinition is not allowed.', 1478265661);
84  }
85 
86  $configurationService = $this->objectManager->get(ConfigurationService::class);
87  $formDefinition = $this->formPersistenceManager->load($formPersistenceIdentifier);
88 
89  if ($prototypeName === null) {
90  $prototypeName = $formDefinition['prototypeName'] ?? 'standard';
91  } else {
92  // Loading a form definition with another prototype is currently not implemented but is planned in the future.
93  // This safety check is a preventive measure.
94  $selectablePrototypeNames = $configurationService->getSelectablePrototypeNamesDefinedInFormEditorSetup();
95  if (!in_array($prototypeName, $selectablePrototypeNames, true)) {
96  throw new ‪Exception(sprintf('The prototype name "%s" is not configured within "formManager.selectablePrototypesConfiguration" ', $prototypeName), 1528625039);
97  }
98  }
99 
100  $formDefinition['prototypeName'] = $prototypeName;
101  $this->prototypeConfiguration = $configurationService->getPrototypeConfiguration($prototypeName);
102 
103  $formDefinition = $this->‪transformFormDefinitionForFormEditor($formDefinition);
104  $formEditorDefinitions = $this->‪getFormEditorDefinitions();
105 
106  $formEditorAppInitialData = [
107  'formEditorDefinitions' => $formEditorDefinitions,
108  'formDefinition' => $formDefinition,
109  'formPersistenceIdentifier' => $formPersistenceIdentifier,
110  'prototypeName' => $prototypeName,
111  'endpoints' => [
112  'formPageRenderer' => $this->controllerContext->getUriBuilder()->uriFor('renderFormPage'),
113  'saveForm' => $this->controllerContext->getUriBuilder()->uriFor('saveForm')
114  ],
115  'additionalViewModelModules' => $this->prototypeConfiguration['formEditor']['dynamicRequireJsModules']['additionalViewModelModules'],
116  'maximumUndoSteps' => $this->prototypeConfiguration['formEditor']['maximumUndoSteps'],
117  ];
118 
119  $this->view->assign('formEditorAppInitialData', json_encode($formEditorAppInitialData));
120  $this->view->assign('stylesheets', $this->‪resolveResourcePaths($this->prototypeConfiguration['formEditor']['stylesheets']));
121  $this->view->assign('formEditorTemplates', $this->‪renderFormEditorTemplates($formEditorDefinitions));
122  $this->view->assign('dynamicRequireJsModules', $this->prototypeConfiguration['formEditor']['dynamicRequireJsModules']);
123 
124  $this->‪getPageRenderer()->‪addInlineLanguageLabelFile('EXT:form/Resources/Private/Language/locallang_formEditor_failSafeErrorHandling_javascript.xlf');
125 
126  $popupWindowWidth = 700;
127  $popupWindowHeight = 750;
128  $popupWindowSize = \trim($this->‪getBackendUser()->getTSConfig()['options.']['popupWindowSize'] ?? '');
129  if (!empty($popupWindowSize)) {
130  list($popupWindowWidth, $popupWindowHeight) = GeneralUtility::intExplode('x', $popupWindowSize);
131  }
132  ‪$uriBuilder = GeneralUtility::makeInstance(UriBuilder::class);
133  $addInlineSettings = [
134  'FormEditor' => [
135  'typo3WinBrowserUrl' => (string)‪$uriBuilder->buildUriFromRoute('wizard_element_browser'),
136  ],
137  'Popup' => [
138  'PopupWindow' => [
139  'width' => $popupWindowWidth,
140  'height' => $popupWindowHeight
141  ],
142  ]
143  ];
144 
145  $addInlineSettings = array_replace_recursive(
146  $addInlineSettings,
147  $this->prototypeConfiguration['formEditor']['addInlineSettings']
148  );
149  $this->view->assign('addInlineSettings', $addInlineSettings);
150  }
151 
158  public function ‪initializeSaveFormAction()
159  {
160  $this->defaultViewObjectName = JsonView::class;
161  }
162 
170  public function ‪saveFormAction(string $formPersistenceIdentifier, ‪FormDefinitionArray $formDefinition)
171  {
172  $formDefinition = $formDefinition->getArrayCopy();
173 
174  foreach (‪$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/form']['beforeFormSave'] ?? [] as $className) {
175  $hookObj = GeneralUtility::makeInstance($className);
176  if (method_exists($hookObj, 'beforeFormSave')) {
177  $formDefinition = $hookObj->beforeFormSave(
178  $formPersistenceIdentifier,
179  $formDefinition
180  );
181  }
182  }
183 
184  ‪$response = [
185  'status' => 'success',
186  ];
187 
188  try {
189  if (!$this->formPersistenceManager->isAllowedPersistencePath($formPersistenceIdentifier)) {
190  throw new ‪PersistenceManagerException(sprintf('Save "%s" is not allowed', $formPersistenceIdentifier), 1614500663);
191  }
192  $this->formPersistenceManager->save($formPersistenceIdentifier, $formDefinition);
193  $configurationService = $this->objectManager->get(ConfigurationService::class);
194  $this->prototypeConfiguration = $configurationService->getPrototypeConfiguration($formDefinition['prototypeName']);
195  $formDefinition = $this->‪transformFormDefinitionForFormEditor($formDefinition);
196  ‪$response['formDefinition'] = $formDefinition;
197  } catch (‪PersistenceManagerException $e) {
198  ‪$response = [
199  'status' => 'error',
200  'message' => $e->getMessage(),
201  'code' => $e->getCode(),
202  ];
203  }
204 
205  $this->view->assign('response', ‪$response);
206  // saveFormAction uses the extbase JsonView::class.
207  // That's why we have to set the view variables in this way.
208  $this->view->setVariablesToRender([
209  'response',
210  ]);
211  }
212 
223  public function ‪renderFormPageAction(‪FormDefinitionArray $formDefinition, int $pageIndex, string $prototypeName = null): string
224  {
225  $prototypeName = $prototypeName ?: $formDefinition['prototypeName'] ?? 'standard';
226  $formDefinition = $formDefinition->getArrayCopy();
227 
228  $formFactory = $this->objectManager->get(ArrayFormFactory::class);
229  $formDefinition = $formFactory->build($formDefinition, $prototypeName);
230  $formDefinition->setRenderingOption('previewMode', true);
231  $form = $formDefinition->bind($this->request, $this->response);
232  $form->setCurrentSiteLanguage($this->‪buildFakeSiteLanguage(0, 0));
233  $form->overrideCurrentPage($pageIndex);
234 
235  return $form->render();
236  }
237 
246  protected function ‪buildFakeSiteLanguage(int $pageId, int $languageId): ‪SiteLanguage
247  {
248  $fakeSiteConfiguration = [
249  'languages' => [
250  [
251  'languageId' => $languageId,
252  'title' => 'Dummy',
253  'navigationTitle' => '',
254  'typo3Language' => '',
255  'flag' => '',
256  'locale' => '',
257  'iso-639-1' => '',
258  'hreflang' => '',
259  'direction' => '',
260  ],
261  ],
262  ];
263 
265  $currentSiteLanguage = GeneralUtility::makeInstance(Site::class, 'form-dummy', $pageId, $fakeSiteConfiguration)
266  ->getLanguageById($languageId);
267  return $currentSiteLanguage;
268  }
269 
277  protected function ‪getInsertRenderablesPanelConfiguration(array $formElementsDefinition): array
278  {
279  $formElementsByGroup = [];
280 
281  foreach ($formElementsDefinition as $formElementName => $formElementConfiguration) {
282  if (!isset($formElementConfiguration['group'])) {
283  continue;
284  }
285  if (!isset($formElementsByGroup[$formElementConfiguration['group']])) {
286  $formElementsByGroup[$formElementConfiguration['group']] = [];
287  }
288 
290  $formElementConfiguration,
291  $this->prototypeConfiguration['formEditor']['translationFile'] ?? null
292  );
293 
294  $formElementsByGroup[$formElementConfiguration['group']][] = [
295  'key' => $formElementName,
296  'cssKey' => preg_replace('/[^a-z0-9]/', '-', strtolower($formElementName)),
297  'label' => $formElementConfiguration['label'],
298  'sorting' => $formElementConfiguration['groupSorting'],
299  'iconIdentifier' => $formElementConfiguration['iconIdentifier'],
300  ];
301  }
302 
303  $formGroups = [];
304  foreach ($this->prototypeConfiguration['formEditor']['formElementGroups'] ?? [] as $groupName => $groupConfiguration) {
305  if (!isset($formElementsByGroup[$groupName])) {
306  continue;
307  }
308 
309  usort($formElementsByGroup[$groupName], function ($a, $b) {
310  return $a['sorting'] - $b['sorting'];
311  });
312  unset($formElementsByGroup[$groupName]['sorting']);
313 
315  $groupConfiguration,
316  $this->prototypeConfiguration['formEditor']['translationFile'] ?? null
317  );
318 
319  $formGroups[] = [
320  'key' => $groupName,
321  'elements' => $formElementsByGroup[$groupName],
322  'label' => $groupConfiguration['label'],
323  ];
324  }
325 
326  return $formGroups;
327  }
328 
334  protected function ‪getFormEditorDefinitions(): array
335  {
336  $formEditorDefinitions = [];
337  foreach ([$this->prototypeConfiguration, $this->prototypeConfiguration['formEditor']] as $configuration) {
338  foreach ($configuration as $firstLevelItemKey => $firstLevelItemValue) {
339  if (substr($firstLevelItemKey, -10) !== 'Definition') {
340  continue;
341  }
342  $reducedKey = substr($firstLevelItemKey, 0, -10);
343  foreach ($configuration[$firstLevelItemKey] as $formEditorDefinitionKey => $formEditorDefinitionValue) {
344  if (isset($formEditorDefinitionValue['formEditor'])) {
345  $formEditorDefinitionValue = array_intersect_key($formEditorDefinitionValue, array_flip(['formEditor']));
346  $formEditorDefinitions[$reducedKey][$formEditorDefinitionKey] = $formEditorDefinitionValue['formEditor'];
347  } else {
348  $formEditorDefinitions[$reducedKey][$formEditorDefinitionKey] = $formEditorDefinitionValue;
349  }
350  }
351  }
352  }
353  $formEditorDefinitions = ‪ArrayUtility::reIndexNumericArrayKeysRecursive($formEditorDefinitions);
355  $formEditorDefinitions,
356  $this->prototypeConfiguration['formEditor']['translationFile'] ?? null
357  );
358  return $formEditorDefinitions;
359  }
360 
366  protected function ‪registerDocheaderButtons()
367  {
369  $buttonBar = $this->view->getModuleTemplate()->getDocHeaderComponent()->getButtonBar();
370  $getVars = $this->request->getArguments();
371 
372  if (isset($getVars['action']) && $getVars['action'] === 'index') {
373  $newPageButton = $buttonBar->makeInputButton()
374  ->setDataAttributes(['action' => 'formeditor-new-page', 'identifier' => 'headerNewPage'])
375  ->setTitle($this->‪getLanguageService()->sL('LLL:EXT:form/Resources/Private/Language/Database.xlf:formEditor.new_page_button'))
376  ->setName('formeditor-new-page')
377  ->setValue('new-page')
378  ->setClasses('t3-form-element-new-page-button hidden')
379  ->setIcon($this->view->getModuleTemplate()->getIconFactory()->getIcon('actions-page-new', ‪Icon::SIZE_SMALL));
381  ‪$uriBuilder = GeneralUtility::makeInstance(UriBuilder::class);
382 
383  $closeButton = $buttonBar->makeLinkButton()
384  ->setDataAttributes(['identifier' => 'closeButton'])
385  ->setHref((string)‪$uriBuilder->buildUriFromRoute('web_FormFormbuilder'))
386  ->setClasses('t3-form-element-close-form-button hidden')
387  ->setTitle($this->‪getLanguageService()->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:rm.closeDoc'))
388  ->setIcon($this->view->getModuleTemplate()->getIconFactory()->getIcon('actions-close', ‪Icon::SIZE_SMALL));
389 
390  $saveButton = $buttonBar->makeInputButton()
391  ->setDataAttributes(['identifier' => 'saveButton'])
392  ->setTitle($this->‪getLanguageService()->sL('LLL:EXT:form/Resources/Private/Language/Database.xlf:formEditor.save_button'))
393  ->setName('formeditor-save-form')
394  ->setValue('save')
395  ->setClasses('t3-form-element-save-form-button hidden')
396  ->setIcon($this->view->getModuleTemplate()->getIconFactory()->getIcon('actions-document-save', ‪Icon::SIZE_SMALL))
397  ->setShowLabelText(true);
398 
399  $formSettingsButton = $buttonBar->makeInputButton()
400  ->setDataAttributes(['identifier' => 'formSettingsButton'])
401  ->setTitle($this->‪getLanguageService()->sL('LLL:EXT:form/Resources/Private/Language/Database.xlf:formEditor.form_settings_button'))
402  ->setName('formeditor-form-settings')
403  ->setValue('settings')
404  ->setClasses('t3-form-element-form-settings-button hidden')
405  ->setIcon($this->view->getModuleTemplate()->getIconFactory()->getIcon('actions-system-extension-configure', ‪Icon::SIZE_SMALL))
406  ->setShowLabelText(true);
407 
408  $undoButton = $buttonBar->makeInputButton()
409  ->setDataAttributes(['identifier' => 'undoButton'])
410  ->setTitle($this->‪getLanguageService()->sL('LLL:EXT:form/Resources/Private/Language/Database.xlf:formEditor.undo_button'))
411  ->setName('formeditor-undo-form')
412  ->setValue('undo')
413  ->setClasses('t3-form-element-undo-form-button hidden disabled')
414  ->setIcon($this->view->getModuleTemplate()->getIconFactory()->getIcon('actions-edit-undo', ‪Icon::SIZE_SMALL));
415 
416  $redoButton = $buttonBar->makeInputButton()
417  ->setDataAttributes(['identifier' => 'redoButton'])
418  ->setTitle($this->‪getLanguageService()->sL('LLL:EXT:form/Resources/Private/Language/Database.xlf:formEditor.redo_button'))
419  ->setName('formeditor-redo-form')
420  ->setValue('redo')
421  ->setClasses('t3-form-element-redo-form-button hidden disabled')
422  ->setIcon($this->view->getModuleTemplate()->getIconFactory()->getIcon('actions-edit-redo', ‪Icon::SIZE_SMALL));
423 
424  $buttonBar->addButton($newPageButton, ‪ButtonBar::BUTTON_POSITION_LEFT, 1);
425  $buttonBar->addButton($closeButton, ‪ButtonBar::BUTTON_POSITION_LEFT, 2);
426  $buttonBar->addButton($saveButton, ‪ButtonBar::BUTTON_POSITION_LEFT, 3);
427  $buttonBar->addButton($formSettingsButton, ‪ButtonBar::BUTTON_POSITION_LEFT, 4);
428  $buttonBar->addButton($undoButton, ‪ButtonBar::BUTTON_POSITION_LEFT, 5);
429  $buttonBar->addButton($redoButton, ‪ButtonBar::BUTTON_POSITION_LEFT, 5);
430  }
431  }
432 
439  protected function ‪renderFormEditorTemplates(array $formEditorDefinitions): string
440  {
441  $fluidConfiguration = $this->prototypeConfiguration['formEditor']['formEditorFluidConfiguration'] ?? null;
442  $formEditorPartials = $this->prototypeConfiguration['formEditor']['formEditorPartials'] ?? null;
443 
444  if (!isset($fluidConfiguration['templatePathAndFilename'])) {
445  throw new ‪RenderingException(
446  'The option templatePathAndFilename must be set.',
447  1485636499
448  );
449  }
450  if (
451  !isset($fluidConfiguration['layoutRootPaths'])
452  || !is_array($fluidConfiguration['layoutRootPaths'])
453  ) {
454  throw new ‪RenderingException(
455  'The option layoutRootPaths must be set.',
456  1480294721
457  );
458  }
459  if (
460  !isset($fluidConfiguration['partialRootPaths'])
461  || !is_array($fluidConfiguration['partialRootPaths'])
462  ) {
463  throw new ‪RenderingException(
464  'The option partialRootPaths must be set.',
465  1480294722
466  );
467  }
468 
469  $insertRenderablesPanelConfiguration = $this->‪getInsertRenderablesPanelConfiguration($formEditorDefinitions['formElements']);
470 
471  ‪$view = $this->objectManager->get(TemplateView::class);
472  ‪$view->‪setControllerContext(clone $this->controllerContext);
473  ‪$view->getRenderingContext()->getTemplatePaths()->fillFromConfigurationArray($fluidConfiguration);
474  ‪$view->setTemplatePathAndFilename($fluidConfiguration['templatePathAndFilename']);
476  'insertRenderablesPanelConfiguration' => $insertRenderablesPanelConfiguration,
477  'formEditorPartials' => $formEditorPartials,
478  ]);
479 
480  return ‪$view->‪render();
481  }
482 
488  protected function ‪transformFormDefinitionForFormEditor(array $formDefinition): array
489  {
490  $multiValueProperties = [];
491  foreach ($this->prototypeConfiguration['formElementsDefinition'] as $type => $configuration) {
492  if (!isset($configuration['formEditor']['editors'])) {
493  continue;
494  }
495  foreach ($configuration['formEditor']['editors'] as $editorConfiguration) {
496  if ($editorConfiguration['templateName'] === 'Inspector-PropertyGridEditor') {
497  $multiValueProperties[$type][] = $editorConfiguration['propertyPath'];
498  }
499  }
500  }
501 
502  $formDefinition = $this->‪filterEmptyArrays($formDefinition);
503 
504  // @todo: replace with rte parsing
505  $formDefinition = ‪ArrayUtility::stripTagsFromValuesRecursive($formDefinition);
506  $formDefinition = $this->‪transformMultiValueElementsForFormEditor($formDefinition, $multiValueProperties);
507 
508  $formDefinitionConversionService = $this->‪getFormDefinitionConversionService();
509  $formDefinition = $formDefinitionConversionService->addHmacData($formDefinition);
510  $formDefinition = $formDefinitionConversionService->migrateFinisherConfiguration($formDefinition);
511 
512  return $formDefinition;
513  }
514 
550  array $formDefinition,
551  array $multiValueProperties
552  ): array {
553  ‪$output = $formDefinition;
554  foreach ($formDefinition as $key => $value) {
555  if (isset($value['type']) && array_key_exists($value['type'], $multiValueProperties)) {
556  $multiValuePropertiesForType = $multiValueProperties[$value['type']];
557  foreach ($multiValuePropertiesForType as $multiValueProperty) {
558  if (!‪ArrayUtility::isValidPath($value, $multiValueProperty, '.')) {
559  continue;
560  }
561  $multiValuePropertyData = ‪ArrayUtility::getValueByPath($value, $multiValueProperty, '.');
562  if (!is_array($multiValuePropertyData)) {
563  continue;
564  }
565  $newMultiValuePropertyData = [];
566  foreach ($multiValuePropertyData as $k => $v) {
567  $newMultiValuePropertyData[] = [
568  '_label' => $v,
569  '_value' => $k
570  ];
571  }
572  $value = ‪ArrayUtility::setValueByPath($value, $multiValueProperty, $newMultiValuePropertyData, '.');
573  }
574  }
575 
576  ‪$output[$key] = $value;
577  if (is_array($value)) {
578  ‪$output[$key] = $this->‪transformMultiValueElementsForFormEditor($value, $multiValueProperties);
579  }
580  }
581 
582  return ‪$output;
583  }
584 
591  protected function ‪filterEmptyArrays(array $array): array
592  {
593  foreach ($array as $key => $value) {
594  if (!is_array($value)) {
595  continue;
596  }
597  if (empty($value)) {
598  unset($array[$key]);
599  continue;
600  }
601  $array[$key] = $this->‪filterEmptyArrays($value);
602  if (empty($array[$key])) {
603  unset($array[$key]);
604  }
605  }
606 
607  return $array;
608  }
609 
614  {
615  return GeneralUtility::makeInstance(FormDefinitionConversionService::class);
616  }
617 
623  protected function ‪getBackendUser(): ‪BackendUserAuthentication
624  {
625  return ‪$GLOBALS['BE_USER'];
626  }
627 
633  protected function ‪getLanguageService(): ‪LanguageService
634  {
635  return ‪$GLOBALS['LANG'];
636  }
637 
643  protected function ‪getPageRenderer(): ‪PageRenderer
644  {
645  return GeneralUtility::makeInstance(PageRenderer::class);
646  }
647 }
‪TYPO3\CMS\Core\Imaging\Icon\SIZE_SMALL
‪const SIZE_SMALL
Definition: Icon.php:29
‪TYPO3\CMS\Form\Domain\Factory\ArrayFormFactory
Definition: ArrayFormFactory.php:36
‪TYPO3\CMS\Core\Page\PageRenderer\addInlineLanguageLabelFile
‪addInlineLanguageLabelFile($fileRef, $selectionPrefix='', $stripFromSelectionName='')
Definition: PageRenderer.php:1678
‪TYPO3\CMS\Form\Service\TranslationService\getInstance
‪static TranslationService getInstance()
Definition: TranslationService.php:82
‪TYPO3\CMS\Backend\Template\Components\ButtonBar\BUTTON_POSITION_LEFT
‪const BUTTON_POSITION_LEFT
Definition: ButtonBar.php:35
‪TYPO3\CMS\Backend\Template\Components\ButtonBar
Definition: ButtonBar.php:31
‪TYPO3\CMS\Form\Controller\FormEditorController
Definition: FormEditorController.php:47
‪TYPO3\CMS\Form\Service\TranslationService
Definition: TranslationService.php:43
‪TYPO3\CMS\Extbase\Mvc\Controller\AbstractController\$uriBuilder
‪TYPO3 CMS Extbase Mvc Web Routing UriBuilder $uriBuilder
Definition: AbstractController.php:37
‪TYPO3\CMS\Core\Imaging\Icon
Definition: Icon.php:25
‪TYPO3\CMS\Form\Mvc\Persistence\Exception\PersistenceManagerException
Definition: PersistenceManagerException.php:26
‪TYPO3\CMS\Extbase\Mvc\Controller\ActionController\$view
‪ViewInterface $view
Definition: ActionController.php:44
‪TYPO3\CMS\Form\Service\TranslationService\translateValuesRecursive
‪array translateValuesRecursive(array $array, $translationFile=null)
Definition: TranslationService.php:178
‪TYPO3\CMS\Form\Domain\Configuration\FormDefinitionConversionService
Definition: FormDefinitionConversionService.php:33
‪TYPO3\CMS\Form\Controller\AbstractBackendController\resolveResourcePaths
‪array resolveResourcePaths(array $resourcePaths)
Definition: AbstractBackendController.php:75
‪TYPO3\CMS\Core\Utility\ArrayUtility\isValidPath
‪static bool isValidPath(array $array, $path, $delimiter='/')
Definition: ArrayUtility.php:143
‪TYPO3\CMS\Form\Controller
Definition: AbstractBackendController.php:3
‪TYPO3\CMS\Form\Controller\FormEditorController\getLanguageService
‪LanguageService getLanguageService()
Definition: FormEditorController.php:631
‪TYPO3\CMS\Fluid\View\TemplateView
Definition: TemplateView.php:24
‪TYPO3\CMS\Form\Controller\FormEditorController\registerDocheaderButtons
‪registerDocheaderButtons()
Definition: FormEditorController.php:364
‪TYPO3\CMS\Core\Site\Entity\Site
Definition: Site.php:39
‪TYPO3\CMS\Form\Controller\FormEditorController\renderFormPageAction
‪string renderFormPageAction(FormDefinitionArray $formDefinition, int $pageIndex, string $prototypeName=null)
Definition: FormEditorController.php:221
‪TYPO3\CMS\Core\Site\Entity\SiteLanguage
Definition: SiteLanguage.php:25
‪TYPO3\CMS\Form\Controller\FormEditorController\renderFormEditorTemplates
‪string renderFormEditorTemplates(array $formEditorDefinitions)
Definition: FormEditorController.php:437
‪TYPO3\CMS\Form\Controller\FormEditorController\$prototypeConfiguration
‪array $prototypeConfiguration
Definition: FormEditorController.php:57
‪TYPO3\CMS\Core\Page\PageRenderer
Definition: PageRenderer.php:35
‪TYPO3\CMS\Core\Utility\ArrayUtility\getValueByPath
‪static mixed getValueByPath(array $array, $path, $delimiter='/')
Definition: ArrayUtility.php:179
‪TYPO3\CMS\Form\Exception
Definition: Exception.php:24
‪TYPO3\CMS\Extbase\Mvc\Controller\ActionController\$response
‪TYPO3 CMS Extbase Mvc Response $response
Definition: ActionController.php:93
‪TYPO3\CMS\Form\Controller\FormEditorController\indexAction
‪indexAction(string $formPersistenceIdentifier, string $prototypeName=null)
Definition: FormEditorController.php:67
‪TYPO3\CMS\Form\Controller\FormEditorController\transformMultiValueElementsForFormEditor
‪array transformMultiValueElementsForFormEditor(array $formDefinition, array $multiValueProperties)
Definition: FormEditorController.php:547
‪TYPO3\CMS\Form\Controller\FormEditorController\getInsertRenderablesPanelConfiguration
‪array getInsertRenderablesPanelConfiguration(array $formElementsDefinition)
Definition: FormEditorController.php:275
‪TYPO3\CMS\Form\Controller\FormEditorController\filterEmptyArrays
‪array filterEmptyArrays(array $array)
Definition: FormEditorController.php:589
‪TYPO3\CMS\Backend\Routing\UriBuilder
Definition: UriBuilder.php:35
‪TYPO3\CMS\Form\Type\FormDefinitionArray
Definition: FormDefinitionArray.php:23
‪TYPO3\CMS\Form\Controller\FormEditorController\$defaultViewObjectName
‪BackendTemplateView $defaultViewObjectName
Definition: FormEditorController.php:53
‪TYPO3\CMS\Core\Authentication\BackendUserAuthentication
Definition: BackendUserAuthentication.php:45
‪TYPO3\CMS\Form\Controller\FormEditorController\getFormEditorDefinitions
‪array getFormEditorDefinitions()
Definition: FormEditorController.php:332
‪TYPO3\CMS\Core\Utility\ArrayUtility\stripTagsFromValuesRecursive
‪static array stripTagsFromValuesRecursive(array $array)
Definition: ArrayUtility.php:825
‪TYPO3\CMS\Form\Controller\FormEditorController\getPageRenderer
‪PageRenderer getPageRenderer()
Definition: FormEditorController.php:641
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService
Definition: ConfigurationService.php:49
‪$output
‪$output
Definition: annotationChecker.php:113
‪TYPO3\CMS\Core\Utility\ArrayUtility\setValueByPath
‪static array setValueByPath(array $array, $path, $value, $delimiter='/')
Definition: ArrayUtility.php:271
‪TYPO3\CMS\Backend\View\BackendTemplateView
Definition: BackendTemplateView.php:27
‪TYPO3\CMS\Form\Controller\FormEditorController\getBackendUser
‪BackendUserAuthentication getBackendUser()
Definition: FormEditorController.php:621
‪TYPO3\CMS\Core\Utility\ArrayUtility
Definition: ArrayUtility.php:23
‪$GLOBALS
‪$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules']
Definition: ext_localconf.php:5
‪TYPO3\CMS\Form\Controller\FormEditorController\saveFormAction
‪saveFormAction(string $formPersistenceIdentifier, FormDefinitionArray $formDefinition)
Definition: FormEditorController.php:168
‪TYPO3\CMS\Extbase\Mvc\View\ViewInterface\render
‪string render()
‪TYPO3\CMS\Core\Utility\ArrayUtility\reIndexNumericArrayKeysRecursive
‪static array reIndexNumericArrayKeysRecursive(array $array)
Definition: ArrayUtility.php:213
‪TYPO3\CMS\Form\Domain\Exception\RenderingException
Definition: RenderingException.php:26
‪TYPO3\CMS\Core\Localization\LanguageService
Definition: LanguageService.php:29
‪TYPO3\CMS\Form\Controller\FormEditorController\buildFakeSiteLanguage
‪SiteLanguage buildFakeSiteLanguage(int $pageId, int $languageId)
Definition: FormEditorController.php:244
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:45
‪TYPO3\CMS\Form\Controller\FormEditorController\getFormDefinitionConversionService
‪FormDefinitionConversionService getFormDefinitionConversionService()
Definition: FormEditorController.php:611
‪TYPO3\CMS\Form\Controller\FormEditorController\initializeSaveFormAction
‪initializeSaveFormAction()
Definition: FormEditorController.php:156
‪TYPO3\CMS\Form\Controller\AbstractBackendController
Definition: AbstractBackendController.php:30
‪TYPO3\CMS\Extbase\Mvc\View\ViewInterface\assignMultiple
‪TYPO3 CMS Extbase Mvc View ViewInterface assignMultiple(array $values)
‪TYPO3\CMS\Extbase\Mvc\View\ViewInterface\setControllerContext
‪setControllerContext(\TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext $controllerContext)
‪TYPO3\CMS\Extbase\Mvc\View\JsonView
Definition: JsonView.php:29
‪TYPO3\CMS\Form\Controller\FormEditorController\transformFormDefinitionForFormEditor
‪array transformFormDefinitionForFormEditor(array $formDefinition)
Definition: FormEditorController.php:486