Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Commit

Permalink
Merge pull request #52 from punktDe/get-typoscript-settings-in-cli-mode
Browse files Browse the repository at this point in the history
TASK: get typoscript settings (typoscript of listidentifier) also cli…
  • Loading branch information
kabarakh authored Dec 16, 2020
2 parents 3a37da0 + 4d3b380 commit 11965eb
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Classes/Domain/Configuration/ConfigurationBuilderFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
***************************************************************/

use PunktDe\PtExtlist\Extbase\ExtbaseContext;
use TYPO3\CMS\Core\TypoScript\TypoScriptService;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Configuration\ConfigurationManager;
use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface;

Expand Down Expand Up @@ -77,6 +79,11 @@ class ConfigurationBuilderFactory
public function injectConfigurationManager(ConfigurationManager $configurationManager)
{
$this->settings = $configurationManager->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_SETTINGS);
if (count($this->settings) === 0) {
// for cli scripts this might be necessary
$completeTS = $configurationManager->getConfiguration(ConfigurationManager::CONFIGURATION_TYPE_FULL_TYPOSCRIPT);
$this->settings = GeneralUtility::makeInstance(TypoScriptService::class)->convertTypoScriptArrayToPlainArray($completeTS['plugin.']['tx_ptextlist.']['settings.']);
}
}


Expand Down

0 comments on commit 11965eb

Please sign in to comment.