/** * @return void */ protected function initializeOverriddenSettings() { $record = $this->getRecord(); $useTypoScriptOptionFromForm = $this->provider->getForm($record)->getOption('useTypoScript'); if (NULL !== $useTypoScriptOptionFromForm) { $this->settings['useTypoScript'] = (bool) $useTypoScriptOptionFromForm; } parent::initializeOverriddenSettings(); }
/** * @return void */ protected function initializeOverriddenSettings() { $row = $this->getRecord(); $flexFormData = $this->configurationService->convertFlexFormContentToArray($row['content_options']); // rename key "settings" from fluidcontent_core $flexFormData['content'] = $flexFormData['settings']; unset($flexFormData['settings']); if (class_exists('\\TYPO3\\CMS\\Core\\Utility\\ArrayUtility')) { /** @noinspection PhpUndefinedClassInspection PhpUndefinedNamespaceInspection */ \TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule($this->settings, $flexFormData); } else { /** @noinspection PhpDeprecationInspection */ $this->settings = GeneralUtility::array_merge_recursive_overrule($this->settings, $flexFormData); } #DebugUtility::debug( $this->settings, '$this->settings' ); parent::initializeOverriddenSettings(); }
/** * @return void */ protected function initializeViewVariables() { $row = $this->getRecord(); $form = $this->provider->getForm($row); $generalSettings = $this->contentConfigurationService->convertFlexFormContentToArray($row['pi_flexform'], $form); $this->settings = RecursiveArrayUtility::merge($this->settings, $generalSettings, FALSE, FALSE); // Add fluidcontent_core form settings (to avoid flux:form.data in templates) if (FALSE === empty($row['content_options'])) { $contentSettings = $this->contentConfigurationService->convertFlexFormContentToArray($row['content_options'], $form); if (FALSE === isset($this->settings['content'])) { $this->settings['content'] = $contentSettings; } else { $this->settings['content'] = RecursiveArrayUtility::merge($this->settings['content'], $contentSettings); } } parent::initializeViewVariables(); }