php TYPO3-CMS-Extbase-Configuration-ConfigurationManagerInterface类(方法)实例源码

下面列出了php TYPO3-CMS-Extbase-Configuration-ConfigurationManagerInterface 类(方法)源码代码实例,从而了解它的用法。

作者:olek0    项目:GiGaBonu   
/**
  * 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;
 }

作者:khanhdeu    项目:typo3tes   
/**
  * 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();
     }
 }

作者:raimundlandi    项目:winkel.de-DE   
/**
  * 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;
 }

作者:extcod    项目:car   
/**
  * 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));
 }

作者:raphaelwebe    项目:sf_simple_fa   
/**
  * 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;
 }

作者:phathoan    项目:sf_event_mg   
/**
  * 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);
 }

作者:beyond-agentu    项目:pt_extbas   
/**
  * 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);
 }

作者:advOp    项目:pw   
/**
  * 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.']);
     }
 }

作者:AlexPixelan    项目:sf_event_mg   
/**
  * 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);
 }

作者:nikoniere    项目:cadabr   
/**
  * 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();
 }

作者:beyond-agentu    项目:pt_extbas   
/**
  * 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);
 }

作者:raimundlandi    项目:winkel.de-DE   
/**
  * 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());
 }

作者:woehrla    项目:Intrane   
/**
  * 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;
 }

作者:beyond-agentu    项目:ya   
/**
  * @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;
 }

作者:3e    项目:tev_mailchim   
/**
  * {@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);
 }

作者:khanhdeu    项目:typo3tes   
public function setUp()
 {
     parent::setUp();
     $this->mockContentObject = $this->getMock('TYPO3\\CMS\\Frontend\\ContentObject\\ContentObjectRenderer', array(), array(), '', FALSE);
     $this->mockConfigurationManager = $this->getMock('TYPO3\\CMS\\Extbase\\Configuration\\ConfigurationManagerInterface');
     $this->mockConfigurationManager->expects($this->any())->method('getContentObject')->will($this->returnValue($this->mockContentObject));
     $this->viewHelper = $this->getMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Format\\CropViewHelper', array('renderChildren'));
     $this->viewHelper->injectConfigurationManager($this->mockConfigurationManager);
     $this->viewHelper->expects($this->once())->method('renderChildren')->will($this->returnValue('Some Content'));
 }

作者:ruudsilvrant    项目:news_importe   
/**
  * Call command
  */
 protected function callCommandMethod()
 {
     $this->settings = $this->configurationManager->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_SETTINGS, 'newsImporter');
     /** @var StorageRepository $storageRepository */
     $storageRepository = $this->objectManager->get(StorageRepository::class);
     foreach ($storageRepository->findAll() as $storage) {
         $storage->setEvaluatePermissions(FALSE);
     }
     parent::callCommandMethod();
 }

作者:qbus-agentu    项目:qbtool   
/**
  * returns a standalone template
  *
  * @param  \string                              $templatePath the template path relative to templateRootPath (UpperCamelCase)
  * @return \TYPO3\CMS\Fluid\View\StandaloneView
  */
 public function buildTemplate($templatePath)
 {
     /** @var \TYPO3\CMS\Fluid\View\StandaloneView $view */
     $view = $this->objectManager->get('TYPO3\\CMS\\Fluid\\View\\StandaloneView');
     $extbaseFrameworkConfiguration = $this->configurationManager->getConfiguration(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);
     $templateRootPath = \TYPO3\CMS\Core\Utility\GeneralUtility::getFileAbsFileName($extbaseFrameworkConfiguration['view']['templateRootPath']);
     $templatePathAndFilename = $templateRootPath . $templatePath;
     $view->setTemplatePathAndFilename($templatePathAndFilename);
     return $view;
 }

作者:kj18    项目:paypa   
/**
  * Inject all dependencies, DI is not available here
  */
 public function __construct()
 {
     $this->objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManager');
     $this->securityService = $this->objectManager->get('Aijko\\Paypal\\Service\\Security');
     $this->configurationManager = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Configuration\\ConfigurationManagerInterface');
     $pluginConfiguration = $this->configurationManager->getConfiguration(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK, 'paypal');
     $this->settings = $pluginConfiguration['settings'];
     $this->securityService->injectSettings($this->settings);
     $this->viewUtility = $this->objectManager->get('Aijko\\SharepointConnector\\Utility\\View');
     $this->viewUtility->setTemplateRootPath($pluginConfiguration['view']['templateRootPath']);
 }

作者:tritumR    项目:contact   
protected function initializeAction()
 {
     if ($GLOBALS['TSFE'] === NULL) {
         $this->pageId = (int) \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('id');
     } else {
         $this->pageId = $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));
     $this->piVars = $this->request->getArguments();
 }


问题


面经


文章

微信
公众号

扫码关注公众号