‪TYPO3CMS  ‪main
AbstractBackendController.php
Go to the documentation of this file.
1 <?php
2 
3 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 
19 
25 
33 {
34  protected array ‪$formSettings;
36 
38  {
39  $this->formPersistenceManager = ‪$formPersistenceManager;
40  }
41 
42  public function ‪initializeObject()
43  {
44  ‪$configurationManager = GeneralUtility::makeInstance(ConfigurationManagerInterface::class);
46  if (!isset($this->formSettings['formManager'])) {
47  // Config sub array formManager is crucial and should always exist. If it does
48  // not, this indicates an issue in config loading logic. Except in this case.
49  throw new \LogicException('Configuration could not be loaded', 1681549038);
50  }
51  }
52 
67  protected function ‪resolveResourcePaths(array $resourcePaths): array
68  {
69  $return = [];
70  foreach ($resourcePaths as $resourcePath) {
71  $resourcePath = ‪PathUtility::getPublicResourceWebPath($resourcePath);
72  if (empty($resourcePath)) {
73  continue;
74  }
75  $return[] = $resourcePath;
76  }
77  return $return;
78  }
79 }
‪TYPO3\CMS\Form\Controller\AbstractBackendController\initializeObject
‪initializeObject()
Definition: AbstractBackendController.php:42
‪TYPO3\CMS\Core\Utility\PathUtility
Definition: PathUtility.php:27
‪TYPO3\CMS\Form\Controller\AbstractBackendController\injectFormPersistenceManager
‪injectFormPersistenceManager(FormPersistenceManagerInterface $formPersistenceManager)
Definition: AbstractBackendController.php:37
‪TYPO3\CMS\Extbase\Mvc\Controller\ActionController\$configurationManager
‪ConfigurationManagerInterface $configurationManager
Definition: ActionController.php:146
‪TYPO3\CMS\Form\Controller
Definition: AbstractBackendController.php:18
‪TYPO3\CMS\Form\Controller\AbstractBackendController\resolveResourcePaths
‪resolveResourcePaths(array $resourcePaths)
Definition: AbstractBackendController.php:67
‪TYPO3\CMS\Form\Controller\AbstractBackendController\$formSettings
‪array $formSettings
Definition: AbstractBackendController.php:34
‪TYPO3\CMS\Core\Utility\PathUtility\getPublicResourceWebPath
‪static getPublicResourceWebPath(string $resourcePath, bool $prefixWithSitePath=true)
Definition: PathUtility.php:97
‪TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface\getConfiguration
‪array getConfiguration(string $configurationType, ?string $extensionName=null, ?string $pluginName=null)
‪TYPO3\CMS\Form\Controller\AbstractBackendController\$formPersistenceManager
‪FormPersistenceManagerInterface $formPersistenceManager
Definition: AbstractBackendController.php:35
‪TYPO3\CMS\Extbase\Mvc\Controller\ActionController
Definition: ActionController.php:61
‪TYPO3\CMS\Form\Mvc\Configuration\ConfigurationManagerInterface\CONFIGURATION_TYPE_YAML_SETTINGS
‪const CONFIGURATION_TYPE_YAML_SETTINGS
Definition: ConfigurationManagerInterface.php:30
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:51
‪TYPO3\CMS\Form\Mvc\Persistence\FormPersistenceManagerInterface
Definition: FormPersistenceManagerInterface.php:32
‪TYPO3\CMS\Form\Controller\AbstractBackendController
Definition: AbstractBackendController.php:33
‪TYPO3\CMS\Form\Mvc\Configuration\ConfigurationManagerInterface
Definition: ConfigurationManagerInterface.php:29