示例#1
0
 /**
  * Parse an configuration with ContentObjectRenderer::cObjGetSingle()
  * and return the result.
  *
  * @param array $configuration
  * @return array
  * @internal
  */
 public function resolvePossibleTypoScriptConfiguration(array $configuration = []) : array
 {
     $configuration = $this->extbaseTypoScriptService->convertPlainArrayToTypoScriptArray($configuration);
     $configuration = $this->resolveTypoScriptConfiguration($configuration);
     $configuration = $this->extbaseTypoScriptService->convertTypoScriptArrayToPlainArray($configuration);
     return $configuration;
 }
 /**
  * Overwrite configuration with
  *      plugin.tx_femanager.settings.new.storeInDatabase
  *
  * @return void
  */
 public function initializeFinisher()
 {
     $configuration = $this->typoScriptService->convertPlainArrayToTypoScriptArray($this->settings);
     if (!empty($configuration['new.']['storeInDatabase.'])) {
         $this->configuration = $configuration['new.']['storeInDatabase.'];
     }
 }
 public function initializeObject()
 {
     $typoScriptArray = $this->frontendConfigurationManager->getTypoScriptSetup();
     if (is_array($typoScriptArray)) {
         $ts = $this->typoScriptService->convertTypoScriptArrayToPlainArray($typoScriptArray);
         $this->settings = $ts['plugin']['tx_typo3forum']['settings'];
     }
 }
 /**
  * Etracker code action.
  *
  * @return string
  */
 public function codeAction()
 {
     if (empty($this->settings['securityCode'])) {
         return '';
     }
     $cObject = $this->configurationManager->getContentObject();
     $params = array();
     $securityCode = trim($this->settings['securityCode']);
     // area
     $area = '';
     if (!empty($this->settings['area'])) {
         $area = trim($this->settings['area']);
     }
     if (!empty($this->settings['areaStdWrap'])) {
         $area = $cObject->stdWrap($area, $this->typoScriptService->convertPlainArrayToTypoScriptArray($this->settings['areaStdWrap']));
     }
     if (!empty($area)) {
         $params['et_areas'] = $area;
     }
     // page name
     if (!empty($this->settings['pageName'])) {
         $pageName = $this->settings['pageName'];
     } else {
         $pageName = !empty($this->getTyposcriptFrontendController()->altPageTitle) ? $this->getTyposcriptFrontendController()->altPageTitle : $this->getTyposcriptFrontendController()->page['title'];
     }
     if (!empty($this->settings['pageNameStdWrap'])) {
         $pageName = $cObject->stdWrap($pageName, $this->typoScriptService->convertPlainArrayToTypoScriptArray($this->settings['pageNameStdWrap']));
     }
     if (!empty($this->settings['pageNamePrefix'])) {
         $prefixGlue = !empty($this->settings['pageNamePrefixGlue']) ? $this->settings['pageNamePrefixGlue'] : '';
         $pageName = $this->settings['pageNamePrefix'] . ' ' . (!empty($prefixGlue) ? $prefixGlue . ' ' : '') . $pageName;
     }
     if (!empty($this->settings['prefixDomainAndLanguageKey'])) {
         $host = strtolower(GeneralUtility::getIndpEnv('TYPO3_HOST_ONLY'));
         $langKey = $this->getTyposcriptFrontendController()->sys_language_isocode ? strtolower($this->getTyposcriptFrontendController()->sys_language_isocode) : '';
         if (!empty($this->settings['defaultLanguageKey']) && empty($langKey)) {
             $langKey = trim($this->settings['defaultLanguageKey']);
         }
         $pageName = '[' . $host . (!empty($langKey) ? '/' . $langKey : '') . '] ' . $pageName;
     }
     if (!empty($this->settings['rootPageId']) && $this->getTyposcriptFrontendController()->id == $this->settings['rootPageId']) {
         $pageName = '__INDEX__' . $pageName;
     }
     if (!empty($pageName)) {
         $params['et_pagename'] = $pageName;
     }
     // utf8 decode fix
     if ($this->settings['enableUTF8DecodeFix']) {
         foreach ($params as $key => $value) {
             $params[$key] = utf8_decode($value);
         }
     }
     return Etracker::getCode($securityCode, $params);
 }
 /**
  * Returns a PageTsConfig instance for a given page.
  *
  * @param  int $pageUid
  * @return \R3H6\Error404page\Configuration\PageTsConfig
  */
 public function getPageTsConfig($pageUid)
 {
     $pageUid = (int) $pageUid;
     if (!isset($this->pageTsConfig[$pageUid])) {
         $pageTsConfig = $this->typoScriptService->convertTypoScriptArrayToPlainArray(BackendUtility::getPagesTSconfig($pageUid));
         $configuration = array();
         if (isset($pageTsConfig[self::TSCONFIG_KEY])) {
             $configuration = (array) $pageTsConfig[self::TSCONFIG_KEY];
         }
         $this->pageTsConfig[$pageUid] = GeneralUtility::makeInstance('R3H6\\Error404page\\Configuration\\PageTsConfig', $configuration, $pageUid);
     }
     return $this->pageTsConfig[$pageUid];
 }
示例#6
0
 /**
  * A function for injecting dependencies. Should be called first
  * thing within the overridden 'execute' method.
  *
  * @param $extensionName
  * @param $pluginName
  */
 protected function initialize($extensionName, $pluginName)
 {
     $injectionService = GeneralUtility::makeInstance('CIC\\Cicbase\\Service\\InjectionService');
     $injectionService->doInjection($this);
     // Grab the settings array
     $this->configurationManager->setConfiguration(array('extensionName' => $extensionName, 'pluginName' => $pluginName));
     $this->settings = $this->configurationManager->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_SETTINGS);
     if (!$this->settings) {
         $configuration = $this->configurationManager->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_FULL_TYPOSCRIPT);
         $settings = $configuration['plugin.']['tx_' . strtolower($extensionName) . '.']['settings.'];
         $this->settings = $this->typoscriptService->convertTypoScriptArrayToPlainArray($settings);
     }
 }
 /**
  * Move all userdefined properties to the additionalArguments
  * array. Ignore the child elements
  *
  * @return void
  */
 public function moveAllOtherUserdefinedPropertiesToAdditionalArguments()
 {
     $viewHelperDefaultArguments = $this->typoScriptRepository->getModelConfigurationByScope($this->element->getElementType(), 'viewHelperDefaultArguments.');
     $ignoreKeys = array();
     foreach ($this->userConfiguredElementTyposcript as $attributeName => $attributeValue) {
         // ignore child elements
         if (MathUtility::canBeInterpretedAsInteger($attributeName) || isset($ignoreKeys[$attributeName]) || $attributeName == 'postProcessor.' || $attributeName == 'rules.' || $attributeName == 'filters.' || $attributeName == 'layout') {
             $ignoreKeys[$attributeName . '.'] = true;
             continue;
         }
         $attributeNameWithoutDot = rtrim($attributeName, '.');
         $attributeNameToSet = $attributeNameWithoutDot;
         if (isset($viewHelperDefaultArguments[$attributeName]) || isset($viewHelperDefaultArguments[$attributeNameWithoutDot])) {
             $this->formBuilder->getFormUtility()->renderArrayItems($attributeValue);
             $attributeValue = $this->typoScriptService->convertTypoScriptArrayToPlainArray($attributeValue);
         } else {
             $attributeValue = $this->formBuilder->getFormUtility()->renderItem($this->userConfiguredElementTyposcript[$attributeNameWithoutDot . '.'], $this->userConfiguredElementTyposcript[$attributeNameWithoutDot]);
         }
         $this->additionalArguments[$attributeNameToSet] = $attributeValue;
         $ignoreKeys[$attributeNameToSet . '.'] = true;
         $ignoreKeys[$attributeNameToSet] = true;
         unset($this->userConfiguredElementTyposcript[$attributeNameWithoutDot . '.']);
         unset($this->userConfiguredElementTyposcript[$attributeNameWithoutDot]);
     }
     // remove "stdWrap." from "additionalArguments" on
     // the FORM Element
     if (!$this->formBuilder->getConfiguration()->getContentElementRendering() && $this->element->getElementType() == 'FORM') {
         unset($this->additionalArguments['stdWrap']);
         unset($this->additionalArguments['stdWrap.']);
     }
 }
 /**
  * Initialize
  */
 public function initializeFinisher()
 {
     $configuration = $this->typoScriptService->convertPlainArrayToTypoScriptArray($this->settings);
     if (!empty($configuration['dbEntry.'])) {
         $this->configuration = $configuration['dbEntry.'];
     }
 }
 /**
  * @return void
  */
 protected function getConfiguration()
 {
     $configuration = $this->typoScriptService->convertTypoScriptArrayToPlainArray($this->getTypoScriptSetup());
     $settings = ObjectAccess::getPropertyPath($configuration, 'tt_content.textmedia.settings.responsive_image_rendering');
     $settings = is_array($settings) ? $settings : [];
     $this->settings['layoutKey'] = isset($settings['layoutKey']) ? $settings['layoutKey'] : 'default';
     $this->settings['sourceCollection'] = isset($settings['sourceCollection']) && is_array($settings['sourceCollection']) ? $settings['sourceCollection'] : [];
     $this->absRefPrefix = ObjectAccess::getPropertyPath($configuration, 'config.absRefPrefix') ?: '';
 }
 /**
  * Returns the TypoScript configuration found in config.tx_extbase
  *
  * @return array
  */
 protected function getExtbaseConfiguration()
 {
     $setup = $this->getTypoScriptSetup();
     $extbaseConfiguration = array();
     if (isset($setup['config.']['tx_extbase.'])) {
         $extbaseConfiguration = $this->typoScriptService->convertTypoScriptArrayToPlainArray($setup['config.']['tx_extbase.']);
     }
     return $extbaseConfiguration;
 }
 /**
  * @return ImageRendererConfiguration
  */
 public function __construct()
 {
     if (isset($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['fluid_styled_responsive_images'])) {
         $extensionConfiguration = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['fluid_styled_responsive_images']);
         if (!is_array($extensionConfiguration)) {
             $extensionConfiguration = ['enableSmallDefaultImage' => true];
         }
         $this->extensionConfiguration = filter_var_array($extensionConfiguration, ['enableSmallDefaultImage' => FILTER_VALIDATE_BOOLEAN], false);
     }
     $this->settings = [];
     $this->typoScriptService = GeneralUtility::makeInstance(TypoScriptService::class);
     $this->tagBuilder = GeneralUtility::makeInstance(TagBuilder::class);
     $configuration = $this->typoScriptService->convertTypoScriptArrayToPlainArray($this->getTypoScriptSetup());
     $settings = ObjectAccess::getPropertyPath($configuration, 'tt_content.textmedia.settings.responsive_image_rendering');
     $settings = is_array($settings) ? $settings : [];
     $this->settings['layoutKey'] = isset($settings['layoutKey']) ? $settings['layoutKey'] : 'default';
     $this->settings['sourceCollection'] = isset($settings['sourceCollection']) && is_array($settings['sourceCollection']) ? $settings['sourceCollection'] : [];
 }
 /**
  * Fetch page TSconfig of the specified page
  *
  * @param  int         $pageUid  page
  * @param  string|null $branch   if specified only this branch of the tree will be returned
  * @return array                 configuration array
  */
 protected function getPageTSconfig($pageUid, $branch = 'tx_html5mediaelements')
 {
     // Not in cache?
     if (!isset($this->pageTSconfigCache[$pageUid])) {
         // Fetch and convert page TSconfig
         $this->pageTSconfigCache[$pageUid] = $this->typoScriptService->convertTypoScriptArrayToPlainArray(BackendUtility::getPagesTSconfig($pageUid));
     }
     // Return configuration from cache
     return isset($branch) ? $this->pageTSconfigCache[$pageUid][$branch] : $this->pageTSconfigCache[$pageUid];
 }
 /**
  * @test
  * @author Alexander Schnitzler <*****@*****.**>
  */
 public function overrideConfigurationFromPluginOverridesCorrectly()
 {
     /** @var $frontendConfigurationManager \TYPO3\CMS\Extbase\Configuration\FrontendConfigurationManager */
     $frontendConfigurationManager = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Configuration\\FrontendConfigurationManager', array('getTypoScriptSetup'));
     $frontendConfigurationManager->_set('contentObject', $this->mockContentObject);
     $frontendConfigurationManager->_set('typoScriptService', $this->mockTypoScriptService);
     $this->mockTypoScriptService->expects($this->once())->method('convertTypoScriptArrayToPlainArray')->will($this->returnValue(array('persistence' => array('storagePid' => '0,1,2,3'), 'settings' => array('foo' => 'bar'), 'view' => array('foo' => 'bar'))));
     $frontendConfigurationManager->expects($this->any())->method('getTypoScriptSetup')->will($this->returnValue(array('plugin.' => array('tx_ext_pi1.' => array('persistence.' => array('storagePid' => '0,1,2,3'), 'settings.' => array('foo' => 'bar'), 'view.' => array('foo' => 'bar'))))));
     $frameworkConfiguration = array('extensionName' => 'ext', 'pluginName' => 'pi1', 'persistence' => array('storagePid' => '1'), 'settings' => array('foo' => 'qux'), 'view' => array('foo' => 'qux'));
     $this->assertSame(array('extensionName' => 'ext', 'pluginName' => 'pi1', 'persistence' => array('storagePid' => '0,1,2,3'), 'settings' => array('foo' => 'bar'), 'view' => array('foo' => 'bar')), $frontendConfigurationManager->_call('overrideConfigurationFromPlugin', $frameworkConfiguration));
 }
 /**
  * Initialize
  */
 public function initializeFinisher()
 {
     $configuration = $this->typoScriptService->convertPlainArrayToTypoScriptArray($this->settings);
     if (!empty($configuration['dbEntry.'])) {
         $this->configuration = $configuration['dbEntry.'];
     }
     if ($this->isConfigurationAvailable()) {
         $this->addArrayToDataArray(['uid' => $this->mail->getUid()]);
         $this->addArrayToDataArray($this->mailRepository->getVariablesWithMarkersFromMail($this->mail));
     }
 }
示例#15
0
 protected function getPluginConfiguration($extensionName, $pluginName = null)
 {
     $setup = $this->configurationManager->getConfiguration(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_FULL_TYPOSCRIPT);
     $pluginConfiguration = array();
     if (TYPO3_MODE === 'FE') {
         $pluginKey = 'plugin.';
     } else {
         $pluginKey = 'module.';
     }
     if (is_array($setup[$pluginKey]['tx_' . strtolower($extensionName) . '.'])) {
         $pluginConfiguration = $this->typoScriptService->convertTypoScriptArrayToPlainArray($setup[$pluginKey]['tx_' . strtolower($extensionName) . '.']);
     }
     if ($pluginName !== null) {
         $pluginSignature = strtolower($extensionName . '_' . $pluginName);
         if (is_array($setup['plugin.']['tx_' . $pluginSignature . '.'])) {
             \TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule($pluginConfiguration, $this->typoScriptService->convertTypoScriptArrayToPlainArray($setup[$pluginKey]['tx_' . $pluginSignature . '.']));
         }
     }
     return $pluginConfiguration;
 }
 /**
  * @test
  */
 public function cachingOfActionsCanNotBeChanged()
 {
     $configuration = array('extensionName' => 'CurrentExtensionName', 'pluginName' => 'CurrentPluginName', 'switchableControllerActions' => array('Controller1' => array('newAction', 'action1'), 'Controller2' => array('newAction2', 'action4', 'action5')));
     $this->mockTypoScriptService->expects($this->any())->method('convertTypoScriptArrayToPlainArray')->with($configuration)->will($this->returnValue($configuration));
     $this->abstractConfigurationManager->setConfiguration($configuration);
     $this->abstractConfigurationManager->expects($this->once())->method('getPluginConfiguration')->with('CurrentExtensionName', 'CurrentPluginName')->will($this->returnValue($this->testPluginConfiguration));
     $this->abstractConfigurationManager->expects($this->once())->method('getSwitchableControllerActions')->with('CurrentExtensionName', 'CurrentPluginName')->will($this->returnValue($this->testSwitchableControllerActions));
     $this->abstractConfigurationManager->expects($this->once())->method('getContextSpecificFrameworkConfiguration')->will($this->returnCallBack(create_function('$a', 'return $a;')));
     $mergedConfiguration = $this->abstractConfigurationManager->getConfiguration();
     $expectedResult = array('Controller1' => array('actions' => array('newAction', 'action1')), 'Controller2' => array('actions' => array('newAction2', 'action4', 'action5'), 'nonCacheableActions' => array('action4')));
     $actualResult = $mergedConfiguration['controllerConfiguration'];
     $this->assertEquals($expectedResult, $actualResult);
 }
 /**
  * @test
  */
 public function getPluginConfigurationRecursivelyMergesExtensionAndPluginConfiguration()
 {
     $testExtensionSettings = array('settings.' => array('foo' => 'bar', 'some.' => array('nested' => 'value')));
     $testExtensionSettingsConverted = array('settings' => array('foo' => 'bar', 'some' => array('nested' => 'value')));
     $testPluginSettings = array('settings.' => array('some.' => array('nested' => 'valueOverridde', 'new' => 'value')));
     $testPluginSettingsConverted = array('settings' => array('some' => array('nested' => 'valueOverridde', 'new' => 'value')));
     $testSetup = array('module.' => array('tx_someextensionname.' => $testExtensionSettings, 'tx_someextensionname_somepluginname.' => $testPluginSettings));
     $this->mockTypoScriptService->expects($this->at(0))->method('convertTypoScriptArrayToPlainArray')->with($testExtensionSettings)->will($this->returnValue($testExtensionSettingsConverted));
     $this->mockTypoScriptService->expects($this->at(1))->method('convertTypoScriptArrayToPlainArray')->with($testPluginSettings)->will($this->returnValue($testPluginSettingsConverted));
     $this->backendConfigurationManager->expects($this->once())->method('getTypoScriptSetup')->will($this->returnValue($testSetup));
     $expectedResult = array('settings' => array('foo' => 'bar', 'some' => array('nested' => 'valueOverridde', 'new' => 'value')));
     $actualResult = $this->backendConfigurationManager->_call('getPluginConfiguration', 'SomeExtensionName', 'SomePluginName');
     $this->assertEquals($expectedResult, $actualResult);
 }
示例#18
0
 /**
  * Set the htmlAttributes and the additionalAttributes
  * Remap htmlAttributes to additionalAttributes if needed
  *
  * @param ElementBuilder $elementBuilder
  * @param Element $element
  * @return void
  */
 protected function setAttributes(ElementBuilder $elementBuilder, Element $element)
 {
     $htmlAttributes = $this->typoScriptRepository->getModelDefinedHtmlAttributes($element->getElementType());
     $elementBuilder->setHtmlAttributes($htmlAttributes);
     $elementBuilder->setHtmlAttributeWildcards();
     $elementBuilder->overlayUserdefinedHtmlAttributeValues();
     $elementBuilder->setNameAndId();
     $elementBuilder->overlayFixedHtmlAttributeValues();
     // remove all NULL values
     $htmlAttributes = array_filter($elementBuilder->getHtmlAttributes());
     $elementBuilder->setHtmlAttributes($htmlAttributes);
     $elementBuilder->moveHtmlAttributesToAdditionalArguments();
     $elementBuilder->setViewHelperDefaulArgumentsToAdditionalArguments();
     $elementBuilder->moveAllOtherUserdefinedPropertiesToAdditionalArguments();
     $htmlAttributes = $elementBuilder->getHtmlAttributes();
     $userConfiguredElementTypoScript = $elementBuilder->getUserConfiguredElementTypoScript();
     $additionalArguments = $elementBuilder->getAdditionalArguments();
     $element->setHtmlAttributes($htmlAttributes);
     $additionalArguments = $this->typoScriptService->convertTypoScriptArrayToPlainArray($additionalArguments);
     $additionalArguments['prefix'] = $this->configuration->getPrefix();
     $element->setAdditionalArguments($additionalArguments);
     $this->handleIncomingValues($element, $userConfiguredElementTypoScript);
     if ($element->getElementType() === 'FORM' && $this->getControllerAction() === 'show') {
         if (empty($element->getHtmlAttribute('action'))) {
             if ($element->getAdditionalArgument('confirmation') && (int) $element->getAdditionalArgument('confirmation') === 1) {
                 $element->setAdditionalArgument('action', 'confirmation');
             } else {
                 $element->setAdditionalArgument('action', 'process');
             }
         } else {
             $element->setAdditionalArgument('pageUid', $element->getHtmlAttribute('action'));
             $element->setAdditionalArgument('action', null);
         }
     }
     // needed if confirmation page is enabled
     if ($this->sessionUtility->getSessionData($element->getName()) && $element->getAdditionalArgument('uploadedFiles') === null) {
         $element->setAdditionalArgument('uploadedFiles', $this->sessionUtility->getSessionData($element->getName()));
     }
 }
示例#19
0
 /**
  * Return icon for file extension
  *
  * @param string $imageType File extension / item type
  * @param string $alt Title attribute value in icon.
  * @param array $specRowConf TypoScript configuration specifically for search result.
  * @return string <img> tag for icon
  * @todo Define visibility
  */
 public function makeItemTypeIcon($imageType, $alt, $specRowConf)
 {
     // Build compound key if item type is 0, iconRendering is not used
     // and specialConfiguration.[pid].pageIcon was set in TS
     if ($imageType === '0' && $specRowConf['_pid'] && is_array($specRowConf['pageIcon']) && !is_array($this->settings['iconRendering'])) {
         $imageType .= ':' . $specRowConf['_pid'];
     }
     if (!isset($this->iconFileNameCache[$imageType])) {
         $this->iconFileNameCache[$imageType] = '';
         // If TypoScript is used to render the icon:
         if (is_array($this->settings['iconRendering'])) {
             /** @var \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer $cObj */
             $cObj = GeneralUtility::makeInstance('TYPO3\\CMS\\Frontend\\ContentObject\\ContentObjectRenderer');
             $cObj->setCurrentVal($imageType);
             $typoScriptArray = $this->typoScriptService->convertPlainArrayToTypoScriptArray($this->settings['iconRendering']);
             $this->iconFileNameCache[$imageType] = $cObj->cObjGetSingle($this->settings['iconRendering']['_typoScriptNodeValue'], $typoScriptArray);
         } else {
             // Default creation / finding of icon:
             $icon = '';
             if ($imageType === '0' || substr($imageType, 0, 2) == '0:') {
                 if (is_array($specRowConf['pageIcon'])) {
                     $this->iconFileNameCache[$imageType] = $GLOBALS['TSFE']->cObj->cObjGetSingle('IMAGE', $specRowConf['pageIcon']);
                 } else {
                     $icon = 'EXT:indexed_search/pi/res/pages.gif';
                 }
             } elseif ($this->externalParsers[$imageType]) {
                 $icon = $this->externalParsers[$imageType]->getIcon($imageType);
             }
             if ($icon) {
                 $fullPath = GeneralUtility::getFileAbsFileName($icon);
                 if ($fullPath) {
                     $info = @getimagesize($fullPath);
                     $iconPath = \TYPO3\CMS\Core\Utility\PathUtility::stripPathSitePrefix($fullPath);
                     $this->iconFileNameCache[$imageType] = is_array($info) ? '<img src="' . $iconPath . '" ' . $info[3] . ' title="' . htmlspecialchars($alt) . '" alt="" />' : '';
                 }
             }
         }
     }
     return $this->iconFileNameCache[$imageType];
 }
示例#20
0
 /**
  * Parse given TypoScript configuration
  *
  * @param array $configuration TypoScript configuration
  * @param boolean $isPlain Is a plain "Fluid like" configuration array
  * @return array Parsed configuration
  */
 public static function parse(array $configuration, $isPlain = TRUE)
 {
     if (empty(self::$contentObject)) {
         self::initialize();
     }
     // Convert to classic TypoScript array
     if ($isPlain) {
         $configuration = \TYPO3\CMS\Extbase\Service\TypoScriptService::convertPlainArrayToTypoScriptArray($configuration);
     }
     // Parse configuration
     $configuration = self::parseTypoScriptArray($configuration);
     $configuration = \TYPO3\CMS\Core\Utility\GeneralUtility::removeDotsFromTS($configuration);
     return $configuration;
 }
 public function initializeObject()
 {
     $ts = $this->typoScriptService->convertTypoScriptArrayToPlainArray(\TYPO3\CMS\Extbase\Configuration\FrontendConfigurationManager::getTypoScriptSetup());
     $this->settings = $ts['plugin']['tx_typo3forum']['settings'];
 }
示例#22
0
 /**
  * @return array
  */
 protected function getSettings()
 {
     if ($this->settings === NULL) {
         $ts = $this->typoScriptService->convertTypoScriptArrayToPlainArray($this->frontendConfigurationManager->getTypoScriptSetup());
         $this->settings = $ts['plugin']['tx_typo3forum']['settings'];
     }
     return $this->settings;
 }
示例#23
0
 /**
  * Get full typoscript configuration
  *
  * @return array
  */
 protected function getFullTypoScriptConfig()
 {
     $setup = $this->configurationManager->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_FULL_TYPOSCRIPT);
     return $this->typoScriptService->convertTypoScriptArrayToPlainArray($setup['plugin.']['tx_t3extblog.']);
 }
示例#24
0
 /**
  * Load settings and apply stdWrap to them
  */
 protected function loadSettings()
 {
     if (!is_array($this->settings['results.'])) {
         $this->settings['results.'] = array();
     }
     $typoScriptArray = $this->typoScriptService->convertPlainArrayToTypoScriptArray($this->settings['results']);
     $this->settings['results.']['summaryCropAfter'] = MathUtility::forceIntegerInRange($GLOBALS['TSFE']->cObj->stdWrap($typoScriptArray['summaryCropAfter'], $typoScriptArray['summaryCropAfter.']), 10, 5000, 180);
     $this->settings['results.']['summaryCropSignifier'] = $GLOBALS['TSFE']->cObj->stdWrap($typoScriptArray['summaryCropSignifier'], $typoScriptArray['summaryCropSignifier.']);
     $this->settings['results.']['titleCropAfter'] = MathUtility::forceIntegerInRange($GLOBALS['TSFE']->cObj->stdWrap($typoScriptArray['titleCropAfter'], $typoScriptArray['titleCropAfter.']), 10, 500, 50);
     $this->settings['results.']['titleCropSignifier'] = $GLOBALS['TSFE']->cObj->stdWrap($typoScriptArray['titleCropSignifier'], $typoScriptArray['titleCropSignifier.']);
     $this->settings['results.']['markupSW_summaryMax'] = MathUtility::forceIntegerInRange($GLOBALS['TSFE']->cObj->stdWrap($typoScriptArray['markupSW_summaryMax'], $typoScriptArray['markupSW_summaryMax.']), 10, 5000, 300);
     $this->settings['results.']['markupSW_postPreLgd'] = MathUtility::forceIntegerInRange($GLOBALS['TSFE']->cObj->stdWrap($typoScriptArray['markupSW_postPreLgd'], $typoScriptArray['markupSW_postPreLgd.']), 1, 500, 60);
     $this->settings['results.']['markupSW_postPreLgd_offset'] = MathUtility::forceIntegerInRange($GLOBALS['TSFE']->cObj->stdWrap($typoScriptArray['markupSW_postPreLgd_offset'], $typoScriptArray['markupSW_postPreLgd_offset.']), 1, 50, 5);
     $this->settings['results.']['markupSW_divider'] = $GLOBALS['TSFE']->cObj->stdWrap($typoScriptArray['markupSW_divider'], $typoScriptArray['markupSW_divider.']);
     $this->settings['results.']['hrefInSummaryCropAfter'] = MathUtility::forceIntegerInRange($GLOBALS['TSFE']->cObj->stdWrap($typoScriptArray['hrefInSummaryCropAfter'], $typoScriptArray['hrefInSummaryCropAfter.']), 10, 400, 60);
     $this->settings['results.']['hrefInSummaryCropSignifier'] = $GLOBALS['TSFE']->cObj->stdWrap($typoScriptArray['hrefInSummaryCropSignifier'], $typoScriptArray['hrefInSummaryCropSignifier.']);
 }
 function add_ts_setup_dots($arr)
 {
     return $this->typoscriptService->convertPlainArrayToTypoScriptArray($arr);
 }