public function processTableConfiguration(array $row, array $configuration) { // Create values for the fluidcontent type selectors $configuration['processedTca']['columns']['tx_fluidcontent_allowedfluidcontent']['config']['items'] = $this->contentConfigurationService->getContentTypeSelectorItems(); $configuration['processedTca']['columns']['tx_fluidcontent_deniedfluidcontent']['config']['items'] = $this->contentConfigurationService->getContentTypeSelectorItems(); return $configuration; }
/** * @return void */ protected function initializeViewVariables() { $row = $this->getRecord(); $form = $this->provider->getForm($row); $generalSettings = $this->configurationService->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->configurationService->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(); }
/** * @param array $row * @return array */ public function getTemplatePaths(array $row) { $extensionName = $this->getExtensionKey($row); $paths = $this->configurationService->getContentConfiguration($extensionName); if (TRUE === is_array($paths) && FALSE === empty($paths)) { $paths = PathUtility::translatePath($paths); } return $paths; }
/** * @param array $row * @return string */ public function getControllerActionFromRecord(array $row) { $fileReference = $this->getControllerActionReferenceFromRecord($row); if (TRUE === empty($fileReference)) { $table = $this->getTableName($row); $this->configurationService->message('No content template found in "' . $table . ':' . $row['uid'] . '"', 1404736585); return 'default'; } $identifier = explode(':', $fileReference); $actionName = array_pop($identifier); $actionName = basename($actionName, '.html'); $actionName[0] = strtolower($actionName[0]); return $actionName; }
/** * @return void */ public function testConfigurationManagerOverrides() { $instance = new ConfigurationService(); /** @var ConfigurationManager|\PHPUnit_Framework_MockObject_MockObject $mock */ $mock = $this->getMock('FluidTYPO3\\Flux\\Configuration\\ConfigurationManager', array('setCurrentPageUid', 'getCurrentPageId')); $mock->expects($this->at(0))->method('setCurrentPageUid')->with(1); $mock->expects($this->at(1))->method('getCurrentPageId')->willReturn(2); $mock->expects($this->at(2))->method('setCurrentPageUid')->with(2); $instance->injectConfigurationManager($mock); $this->callInaccessibleMethod($instance, 'overrideCurrentPageUidForConfigurationManager', 1); $this->callInaccessibleMethod($instance, 'backupPageUidForConfigurationManager'); $this->callInaccessibleMethod($instance, 'restorePageUidForConfigurationManager'); }
/** * @param array $items * @param NewContentElementController $parentObject * @return void */ public function manipulateWizardItems(&$items, &$parentObject) { $this->configurationService->writeCachedConfigurationIfMissing(); $items = $this->filterPermittedFluidContentTypesByInsertionPosition($items, $parentObject); }