本文整理汇总了PHP中TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface类的典型用法代码示例。如果您正苦于以下问题:PHP ConfigurationManagerInterface类的具体用法?PHP ConfigurationManagerInterface怎么用?PHP ConfigurationManagerInterface使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ConfigurationManagerInterface类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: render
/**
* Render the captcha image html
*
* @param string suffix to be appended to the extenstion key when forming css class names
* @return string The html used to render the captcha image
*/
public function render($suffix = '')
{
$value = '';
// Include the required JavaScript
$GLOBALS['TSFE']->additionalHeaderData[$this->extensionKey . '_freeCap'] = '<script type="text/javascript" src="' . GeneralUtility::createVersionNumberedFilename(ExtensionManagementUtility::siteRelPath($this->extensionKey) . 'Resources/Public/JavaScript/freeCap.js') . '"></script>';
// Disable caching
$GLOBALS['TSFE']->no_cache = 1;
// Get the plugin configuration
$settings = $this->configurationManager->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_SETTINGS, $this->extensionName);
// Get the translation view helper
$objectManager = GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManager');
$translator = $objectManager->get('SJBR\\SrFreecap\\ViewHelpers\\TranslateViewHelper');
$translator->injectConfigurationManager($this->configurationManager);
// Generate the image url
$fakeId = GeneralUtility::shortMD5(uniqid(rand()), 5);
$siteURL = GeneralUtility::getIndpEnv('TYPO3_SITE_URL');
$L = GeneralUtility::_GP('L');
$urlParams = array('eID' => 'sr_freecap_EidDispatcher', 'id' => $GLOBALS['TSFE']->id, 'vendorName' => 'SJBR', 'extensionName' => 'SrFreecap', 'pluginName' => 'ImageGenerator', 'controllerName' => 'ImageGenerator', 'actionName' => 'show', 'formatName' => 'png', 'L' => $GLOBALS['TSFE']->sys_language_uid);
if ($GLOBALS['TSFE']->MP) {
$urlParams['MP'] = $GLOBALS['TSFE']->MP;
}
$urlParams['set'] = $fakeId;
$imageUrl = $siteURL . 'index.php?' . ltrim(GeneralUtility::implodeArrayForUrl('', $urlParams), '&');
// Generate the html text
$value = '<img' . $this->getClassAttribute('image', $suffix) . ' id="tx_srfreecap_captcha_image_' . $fakeId . '"' . ' src="' . htmlspecialchars($imageUrl) . '"' . ' alt="' . $translator->render('altText') . ' "/>' . '<span' . $this->getClassAttribute('cant-read', $suffix) . '>' . $translator->render('cant_read1') . ' <a href="#" onclick="this.blur();' . $this->extensionName . '.newImage(\'' . $fakeId . '\', \'' . $translator->render('noImageMessage') . '\');return false;">' . $translator->render('click_here') . '</a>' . $translator->render('cant_read2') . '</span>';
return $value;
}
示例2: initialize
/**
* Initializes configuration manager, object container and reflection service
*
* @param array $configuration
* @return void
*/
protected function initialize(array $configuration)
{
// initialize unconsumed Request and Response
$this->request = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Mvc\\Cli\\Request');
$this->response = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Mvc\\Cli\\Response');
// initialize configuration
$this->configurationManager->setContentObject(\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Frontend\\ContentObject\\ContentObjectRenderer'));
$this->configurationManager->setConfiguration($configuration);
// configure object container
$frameworkConfiguration = $this->configurationManager->getConfiguration(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);
if (isset($frameworkConfiguration['objects'])) {
$objectContainer = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\Container\\Container');
foreach ($frameworkConfiguration['objects'] as $classNameWithDot => $classConfiguration) {
if (isset($classConfiguration['className'])) {
$originalClassName = rtrim($classNameWithDot, '.');
$objectContainer->registerImplementation($originalClassName, $classConfiguration['className']);
}
}
}
// initialize reflection
$reflectionService = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Reflection\\ReflectionService');
$reflectionService->setDataCache(\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Cache\\CacheManager')->getCache('extbase_reflection'));
if (!$reflectionService->isInitialized()) {
$reflectionService->initialize();
}
}
示例3: getSettings
/**
* Returns all settings.
*
* @return array
*/
public function getSettings()
{
if ($this->settings === NULL) {
$this->settings = $this->configurationManager->getConfiguration(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_SETTINGS, 'News', 'Pi1');
}
return $this->settings;
}
示例4: initializeAction
/**
* Action initializer
*
* @return void
*/
protected function initializeAction()
{
$pageId = (int) \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('id');
$frameworkConfiguration = $this->configurationManager->getConfiguration(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);
$persistenceConfiguration = ['persistence' => ['storagePid' => $pageId]];
$this->configurationManager->setConfiguration(array_merge($frameworkConfiguration, $persistenceConfiguration));
}
示例5: getConfiguration
/**
* Returns the TS configuration
*
* @return array|mixed
*/
public function getConfiguration()
{
if ($this->configuration === NULL) {
$this->configuration = $this->configurationManager->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);
}
return $this->configuration;
}
示例6: cleanupCommand
/**
* The cleanup command
*
* @return void
*/
public function cleanupCommand()
{
$fullSettings = $this->configurationManager->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_FULL_TYPOSCRIPT, 'SfEventMgt', 'Pievent');
$settings = $fullSettings['plugin.']['tx_sfeventmgt.']['settings.'];
$this->registrationService->handleExpiredRegistrations($settings['registration.']['deleteExpiredRegistrations']);
// Clear cache for configured pages
$this->utilityService->clearCacheForConfiguredUids($settings);
}
示例7: initializeObject
/**
* Initialize the object (called by objectManager)
*
*/
public function initializeObject()
{
$frameWorkConfiguration = $this->configurationManager->getConfiguration(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);
$this->extensionName = $frameWorkConfiguration['extensionName'];
$this->extensionNameSpace = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManager')->get('TYPO3\\CMS\\Extbase\\Service\\ExtensionService')->getPluginNamespace($frameWorkConfiguration['extensionName'], $frameWorkConfiguration['pluginName']);
$this->inCachedMode = $frameWorkConfiguration['pluginName'] == 'Cached' ? true : false;
unset($frameWorkConfiguration);
}
示例8: injectConfigurationManager
/**
* Injects the Configuration Manager
*
* @param ConfigurationManagerInterface $configurationManager
* @return void
*/
public function injectConfigurationManager(ConfigurationManagerInterface $configurationManager)
{
$this->configurationManager = $configurationManager;
$typoScriptSetup = $this->configurationManager->getConfiguration(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_FULL_TYPOSCRIPT);
if (!empty($typoScriptSetup['plugin.']['tx_powermail.']['settings.']['setup.'])) {
$this->settings = \TYPO3\CMS\Core\Utility\GeneralUtility::removeDotsFromTS($typoScriptSetup['plugin.']['tx_powermail.']['settings.']['setup.']);
}
}
示例9: cleanupCommand
/**
* The cleanup command
*
* @return void
*/
public function cleanupCommand()
{
$fullSettings = $this->configurationManager->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_FULL_TYPOSCRIPT, 'SfEventMgt', 'Pievent');
$settings = $fullSettings['plugin.']['tx_sfeventmgt.']['settings.'];
$this->registrationService->handleExpiredRegistrations($settings['registration.']['deleteExpiredRegistrations']);
$pidList = explode(',', $settings['clearCacheUids']);
$this->cacheService->clearPageCache($pidList);
}
示例10: initializeObject
/**
* Initialize objects
*/
public function initializeObject()
{
$configuration = $this->configurationManager->getConfiguration(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);
$this->settings = $configuration['settings'];
$this->features = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
$this->priceInfluencer = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
$this->information = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
}
示例11: initializeObject
/**
* Initialize the object (called by objectManager)
*
*/
public function initializeObject()
{
$frameWorkConfiguration = $this->configurationManager->getConfiguration(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);
$this->extensionName = $frameWorkConfiguration['extensionName'];
$this->setExtensionNamespace($frameWorkConfiguration['extensionName'], $frameWorkConfiguration['pluginName']);
$this->isInCachedMode = $frameWorkConfiguration['pluginName'] == 'Cached' ? true : false;
$this->currentListIdentifier = $frameWorkConfiguration['settings']['listIdentifier'];
unset($frameWorkConfiguration);
}
示例12: initializeAction
/**
* Action initializer
*
* @return void
*/
protected function initializeAction()
{
# $this->pageId = (int)t3lib_div::_GP('id');
$this->pageId = (int) $GLOBALS['TSFE']->id;
$frameworkConfiguration = $this->configurationManager->getConfiguration(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);
$persistenceConfiguration = array('persistence' => array('storagePid' => $this->pageId));
$this->configurationManager->setConfiguration(array_merge($frameworkConfiguration, $persistenceConfiguration));
#debug($this->request->getArguments());
}
示例13: render
/**
* Check if this field is a required field
*
* @param \string $fieldName
* @param \string $actionName
* @return \bool
*/
public function render($fieldName, $actionName = 'editAction')
{
$action = str_replace('Action', '', $actionName);
$configuration = $this->configurationManager->getConfiguration(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);
if (isset($configuration['settings'][$action]['validation'][$fieldName]['required']) && $configuration['settings'][$action]['validation'][$fieldName]['required'] === '1') {
return TRUE;
}
return FALSE;
}
示例14: getSelectedResolutionConfigs
/**
* @return \Tx_Yag_Domain_Configuration_Image_ResolutionConfigCollection
*/
protected function getSelectedResolutionConfigs()
{
$settings = $this->configurationManager->getConfiguration(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_SETTINGS, 'Yag', 'pi1');
\Tx_Yag_Domain_Configuration_ConfigurationBuilderFactory::injectSettings($settings);
$configurationBuilder = \Tx_Yag_Domain_Configuration_ConfigurationBuilderFactory::getInstance('default', 'backend');
$resolutionConfigCollection = \Tx_Yag_Domain_Configuration_Image_ResolutionConfigCollectionFactory::getInstanceOfAllThemes($configurationBuilder);
$selectedResolutionConfigCollection = $resolutionConfigCollection->extractCollectionByThemeList($this->selectedThemes);
return $selectedResolutionConfigCollection;
}
示例15: initializeObject
/**
* {@inheritdoc}
*/
public function initializeObject()
{
$this->defaultOrderings = ['name' => QueryInterface::ORDER_ASCENDING];
// Ensure correct storage PID is used, regardless of what plugin the
// repository is injected into
$config = $this->cm->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK, 'tevmailchimp');
$querySettings = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Typo3QuerySettings');
$querySettings->setStoragePageIds([$config['persistence']['storagePid']]);
$this->setDefaultQuerySettings($querySettings);
}