当前位置: 首页>>代码示例>>PHP>>正文


PHP ConfigurationManager::getConfiguration方法代码示例

本文整理汇总了PHP中TYPO3\Flow\Configuration\ConfigurationManager::getConfiguration方法的典型用法代码示例。如果您正苦于以下问题:PHP ConfigurationManager::getConfiguration方法的具体用法?PHP ConfigurationManager::getConfiguration怎么用?PHP ConfigurationManager::getConfiguration使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TYPO3\Flow\Configuration\ConfigurationManager的用法示例。


在下文中一共展示了ConfigurationManager::getConfiguration方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: initializeObject

 /**
  * Called by the Flow object framework after creating the object and resolving all dependencies.
  *
  * @param integer $cause Creation cause
  */
 public function initializeObject($cause)
 {
     if ($cause === \TYPO3\Flow\Object\ObjectManagerInterface::INITIALIZATIONCAUSE_CREATED) {
         $settings = $this->configurationManager->getConfiguration(ConfigurationManager::CONFIGURATION_TYPE_SETTINGS, 'TYPO3.TYPO3CR.Search');
         $this->indexName = $settings['elasticSearch']['indexName'];
     }
 }
开发者ID:kdambekalns,项目名称:Flowpack.ElasticSearch.ContentRepositoryAdaptor,代码行数:12,代码来源:ElasticSearchClient.php

示例2: addDynamicNodeConfiguration

 /**
  * This aspect will block loadNodeTypes from being called and will instead
  * call overrideNodeTypes with a modified configuration.
  *
  * @Flow\Around("method(TYPO3\TYPO3CR\Domain\Service\NodeTypeManager->loadNodeTypes())")
  * @param JoinPointInterface $joinPoint The current join point
  * @return void
  */
 public function addDynamicNodeConfiguration(JoinPointInterface $joinPoint)
 {
     $completeNodeTypeConfiguration = $this->configurationManager->getConfiguration('NodeTypes');
     $dynamicNodeTypes = $this->dynamicNodeTypeRepository->findAll();
     /* @var $dynamicNodeType DynamicNodeType */
     foreach ($dynamicNodeTypes as $dynamicNodeType) {
         $dynamicNodeName = $dynamicNodeType->getValidNodeTypeName($this->settings['nodeNamespace']);
         if (!array_key_exists($dynamicNodeName, $completeNodeTypeConfiguration)) {
             $dynamicProperties = array();
             /* @var $dynamicProperty DynamicProperty */
             foreach ($dynamicNodeType->getDynamicProperties() as $dynamicProperty) {
                 $dynamicPropertyName = $dynamicProperty->getValidPropertyName($this->settings['propertyPrefix']);
                 $dynamicProperties[$dynamicPropertyName] = array('type' => 'string', 'defaultValue' => $dynamicProperty->getDefaultValue(), 'ui' => array('label' => $dynamicProperty->getLabel(), 'reloadIfChanged' => TRUE, 'inlineEditable' => TRUE, 'aloha' => array('placeholder' => $dynamicProperty->getPlaceholder()), 'inspector' => array('group' => 'dynamicProperties', 'editorOptions' => array('placeholder' => $dynamicProperty->getPlaceholder()))));
             }
             $newNodeConfiguration = array('superTypes' => $this->settings['superTypes'], 'abstract' => FALSE, 'ui' => array('label' => $dynamicNodeType->getLabel()));
             // Only set properties if there are any.
             // If properties is set to an empty array a bug in Neos will break the node configuration.
             // This leads to an empty inspector and strange error messages.
             if (count($dynamicProperties)) {
                 $newNodeConfiguration['properties'] = $dynamicProperties;
             }
             $completeNodeTypeConfiguration[$dynamicNodeName] = $newNodeConfiguration;
         }
     }
     /* @var $nodeTypeManager NodeTypeManager */
     $nodeTypeManager = $joinPoint->getProxy();
     $nodeTypeManager->overrideNodeTypes($completeNodeTypeConfiguration);
 }
开发者ID:sinso,项目名称:Shel.DynamicNodes,代码行数:36,代码来源:DynamicNodesConfigurationInjectionAspect.php

示例3: initializeObject

 /**
  * Gets the authentication provider configuration needed
  *
  * @return void
  */
 public function initializeObject()
 {
     $settings = $this->configurationManager->getConfiguration(\TYPO3\Flow\Configuration\ConfigurationManager::CONFIGURATION_TYPE_SETTINGS, 'TYPO3.Flow');
     if (isset($settings['security']['authentication']['providers']['Typo3SetupProvider']['providerOptions']['keyName'])) {
         $this->keyName = $settings['security']['authentication']['providers']['Typo3SetupProvider']['providerOptions']['keyName'];
     }
 }
开发者ID:kdambekalns,项目名称:setup,代码行数:12,代码来源:LoginController.php

示例4: initializeObject

 /**
  * Called by the Flow object framework after creating the object and resolving all dependencies.
  *
  * @param integer $cause Creation cause
  */
 public function initializeObject($cause)
 {
     if ($cause === \TYPO3\Flow\Object\ObjectManagerInterface::INITIALIZATIONCAUSE_CREATED) {
         $settings = $this->configurationManager->getConfiguration(\TYPO3\Flow\Configuration\ConfigurationManager::CONFIGURATION_TYPE_SETTINGS, 'TYPO3.TYPO3CR.Search');
         $this->defaultConfigurationPerType = $settings['defaultConfigurationPerType'];
     }
 }
开发者ID:kdambekalns,项目名称:Flowpack.ElasticSearch.ContentRepositoryAdaptor,代码行数:12,代码来源:NodeTypeMappingBuilder.php

示例5: getSettings

 /**
  * Get package settings
  */
 public function getSettings()
 {
     if (!is_array($this->settings)) {
         $this->settings = $this->configurationManager->getConfiguration(ConfigurationManager::CONFIGURATION_TYPE_SETTINGS, 'Ttree.JobButler');
     }
     return $this->settings;
 }
开发者ID:johannessteu,项目名称:JobButler,代码行数:10,代码来源:AbstractJobConfiguration.php

示例6: getViewConfiguration

 /**
  * This method walks through the view configuration and applies
  * matching configurations in the order of their specifity score.
  * Possible options are currently the viewObjectName to specify
  * a different class that will be used to create the view and
  * an array of options that will be set on the view object.
  *
  * @param \TYPO3\Flow\Mvc\ActionRequest $request
  * @return array
  */
 public function getViewConfiguration(ActionRequest $request)
 {
     $cacheIdentifier = $this->createCacheIdentifier($request);
     $viewConfiguration = $this->cache->get($cacheIdentifier);
     if ($viewConfiguration === false) {
         $configurations = $this->configurationManager->getConfiguration('Views');
         $requestMatcher = new RequestMatcher($request);
         $context = new Context($requestMatcher);
         $matchingConfigurations = array();
         foreach ($configurations as $order => $configuration) {
             $requestMatcher->resetWeight();
             if (!isset($configuration['requestFilter'])) {
                 $matchingConfigurations[$order]['configuration'] = $configuration;
                 $matchingConfigurations[$order]['weight'] = $order;
             } else {
                 $result = $this->eelEvaluator->evaluate($configuration['requestFilter'], $context);
                 if ($result === false) {
                     continue;
                 }
                 $matchingConfigurations[$order]['configuration'] = $configuration;
                 $matchingConfigurations[$order]['weight'] = $requestMatcher->getWeight() + $order;
             }
         }
         usort($matchingConfigurations, function ($configuration1, $configuration2) {
             return $configuration1['weight'] > $configuration2['weight'];
         });
         $viewConfiguration = array();
         foreach ($matchingConfigurations as $key => $matchingConfiguration) {
             $viewConfiguration = Arrays::arrayMergeRecursiveOverrule($viewConfiguration, $matchingConfiguration['configuration']);
         }
         $this->cache->set($cacheIdentifier, $viewConfiguration);
     }
     return $viewConfiguration;
 }
开发者ID:robertlemke,项目名称:flow-development-collection,代码行数:44,代码来源:ViewConfigurationManager.php

示例7: getModelDeclaration

 /**
  * @param string $modelClassName
  * @param array $properties
  * @param string $applicationName
  * @param array $foundRelations
  * @return string
  */
 public function getModelDeclaration($modelClassName, array $properties, $applicationName, array &$foundRelations)
 {
     $globalPropertyIgnoreConfiguration = $this->configurationManager->getConfiguration('Settings', 'Radmiraal.Emberjs.properties._exclude');
     $modelGenerationPropertyIgnoreConfiguration = $this->configurationManager->getConfiguration('Settings', 'Radmiraal.Emberjs.applications.' . $applicationName . '.model.ignoredProperties');
     $ignoredProperties = array_merge($globalPropertyIgnoreConfiguration ?: array(), $modelGenerationPropertyIgnoreConfiguration ?: array());
     $typeMapping = $this->configurationManager->getConfiguration('Settings', 'Radmiraal.Emberjs.applications.' . $applicationName . '.model.typeMapping');
     $propertyDefinition = array();
     foreach ($properties as $property => $propertyConfiguration) {
         if ($property === 'id' || in_array($property, $ignoredProperties) || $this->reflectionService->isPropertyAnnotatedWith($modelClassName, $property, 'TYPO3\\Flow\\Annotations\\Transient')) {
             continue;
         }
         $type = $propertyConfiguration['type'];
         if (isset($typeMapping[$type])) {
             $type = $typeMapping[$type];
         }
         if (strpos($propertyConfiguration['type'], '\\')) {
             if (!in_array($propertyConfiguration['type'], $foundRelations)) {
                 $foundRelations[] = $propertyConfiguration['type'];
             }
             $type = 'App.' . EmberDataUtility::uncamelizeClassName($type);
         }
         $propertyDefinition[] = sprintf('%s%s: DS.attr("%s")', chr(10) . "\t", $property, !empty($type) ? $type : 'string');
     }
     $modelName = EmberDataUtility::uncamelizeClassName($modelClassName);
     return sprintf('App.%s = DS.Model.extend(App.ModelMixin, {%s%s});', $modelName, implode(',', $propertyDefinition), chr(10)) . chr(10);
 }
开发者ID:putheakhem,项目名称:Radmiraal.Emberjs,代码行数:33,代码来源:ModelDefinitionUtility.php

示例8: getTokenEndpointForProvider

 /**
  * @param string $providerName The provider name as given in Settings.yaml
  * @throws \InvalidArgumentException
  * @return TokenEndpointInterface
  */
 public function getTokenEndpointForProvider($providerName)
 {
     $tokenEndpointClassName = $this->configurationManager->getConfiguration(ConfigurationManager::CONFIGURATION_TYPE_SETTINGS, sprintf('TYPO3.Flow.security.authentication.providers.%s.providerOptions.tokenEndpointClassName', $providerName));
     if ($tokenEndpointClassName === NULL) {
         throw new \InvalidArgumentException(sprintf('In Settings.yaml, there was no "tokenEndpointClassName" option given for the provider "%s".', $providerName), 1383743372);
     }
     return $this->objectManager->get($tokenEndpointClassName);
 }
开发者ID:avency,项目名称:Flowpack.OAuth2.Client,代码行数:13,代码来源:Resolver.php

示例9: injectConfigurationManager

 /**
  * Injects the configuration manager
  *
  * @param \TYPO3\Flow\Configuration\ConfigurationManager $configurationManager
  * @return void
  */
 public function injectConfigurationManager(\TYPO3\Flow\Configuration\ConfigurationManager $configurationManager)
 {
     $this->configurationManager = $configurationManager;
     $this->matches = $this->configurationManager->getConfiguration(\TYPO3\Flow\Configuration\ConfigurationManager::CONFIGURATION_TYPE_SETTINGS, 'Debug.Profiling.Classes');
     foreach ($this->matches as $key => $value) {
         $this->matches[$key] = '/^' . str_replace('\\', '\\\\', $value) . '$/';
     }
 }
开发者ID:radmiraal,项目名称:Debug.Toolbar,代码行数:14,代码来源:PointcutSettingsClassFilter.php

示例10: handle

 /**
  * Resolve a route for the request
  *
  * Stores the resolved route values in the ComponentContext to pass them
  * to other components. They can be accessed via ComponentContext::getParameter('TYPO3\Flow\Mvc\Routing\RoutingComponent', 'matchResults');
  *
  * @param ComponentContext $componentContext
  * @return void
  */
 public function handle(ComponentContext $componentContext)
 {
     if ($componentContext->getParameter('TYPO3\\Flow\\Mvc\\Routing\\RoutingComponent', 'skipRouterInitialization') !== TRUE) {
         $routesConfiguration = $this->configurationManager->getConfiguration(ConfigurationManager::CONFIGURATION_TYPE_ROUTES);
         $this->router->setRoutesConfiguration($routesConfiguration);
     }
     $matchResults = $this->router->route($componentContext->getHttpRequest());
     $componentContext->setParameter('TYPO3\\Flow\\Mvc\\Routing\\RoutingComponent', 'matchResults', $matchResults);
 }
开发者ID:sokunthearith,项目名称:Intern-Project-Week-2,代码行数:18,代码来源:RoutingComponent.php

示例11: initializeObject

 /**
  * @return void
  */
 public function initializeObject()
 {
     $this->settings = $this->configurationManager->getConfiguration('Settings', 'TYPO3.Media');
     $domain = $this->domainRepository->findOneByActiveRequest();
     // Set active asset collection to the current site's asset collection, if it has one, on the first view if a matching domain is found
     if ($domain !== null && !$this->browserState->get('activeAssetCollection') && $this->browserState->get('automaticAssetCollectionSelection') !== true && $domain->getSite()->getAssetCollection() !== null) {
         $this->browserState->set('activeAssetCollection', $domain->getSite()->getAssetCollection());
         $this->browserState->set('automaticAssetCollectionSelection', true);
     }
 }
开发者ID:mgoldbeck,项目名称:neos-development-collection,代码行数:13,代码来源:AssetController.php

示例12: prepareRealtimeIndexing

 /**
  * @param \TYPO3\Flow\Core\Bootstrap $bootstrap
  */
 public function prepareRealtimeIndexing(\TYPO3\Flow\Core\Bootstrap $bootstrap)
 {
     $this->configurationManager = $bootstrap->getObjectManager()->get('TYPO3\\Flow\\Configuration\\ConfigurationManager');
     $settings = $this->configurationManager->getConfiguration(\TYPO3\Flow\Configuration\ConfigurationManager::CONFIGURATION_TYPE_SETTINGS, $this->getPackageKey());
     if (isset($settings['realtimeIndexing']['enabled']) && $settings['realtimeIndexing']['enabled'] === TRUE) {
         $bootstrap->getSignalSlotDispatcher()->connect('Flowpack\\ElasticSearch\\Indexer\\Object\\Signal\\SignalEmitter', 'objectUpdated', 'Flowpack\\ElasticSearch\\Indexer\\Object\\ObjectIndexer', 'indexObject');
         $bootstrap->getSignalSlotDispatcher()->connect('Flowpack\\ElasticSearch\\Indexer\\Object\\Signal\\SignalEmitter', 'objectPersisted', 'Flowpack\\ElasticSearch\\Indexer\\Object\\ObjectIndexer', 'indexObject');
         $bootstrap->getSignalSlotDispatcher()->connect('Flowpack\\ElasticSearch\\Indexer\\Object\\Signal\\SignalEmitter', 'objectRemoved', 'Flowpack\\ElasticSearch\\Indexer\\Object\\ObjectIndexer', 'removeObject');
     }
 }
开发者ID:johannessteu,项目名称:Flowpack.ElasticSearch,代码行数:13,代码来源:Package.php

示例13: render

 /**
  * Renders an HTML tag from a given asset.
  *
  * @param string $layout
  * @param int $columnNo
  * @return string
  */
 public function render($layout, $columnNo = 1)
 {
     $settings = $this->configurationManager->getConfiguration(ConfigurationManager::CONFIGURATION_TYPE_SETTINGS, 'JohannesSteu.Bootstrap.GridSystem.Layouts');
     if (array_key_exists($layout, $settings)) {
         if (array_key_exists("col-" . $columnNo, $settings[$layout])) {
             return $settings[$layout]["col-" . $columnNo];
         }
     }
     return "";
 }
开发者ID:OwlAsh,项目名称:JohannesSteu.Bootstrap.GridSystem,代码行数:17,代码来源:GridLayoutViewHelper.php

示例14: getGuides

 /**
  * @return array
  */
 protected function getGuides()
 {
     $out = [];
     $chartSettings = $this->configurationManager->getConfiguration(ConfigurationManager::CONFIGURATION_TYPE_SETTINGS, 'WMDB.Forger.Charts');
     foreach ($chartSettings['Phases'] as $version => $phases) {
         foreach ($phases as $phaseName => $dates) {
             $out[] = ['fillAlpha' => 0.5, 'date' => $dates['start'], 'toDate' => $dates['end'], 'label' => $phaseName, 'position' => 'top', 'inside' => TRUE, 'fillColor' => $chartSettings['Colors'][$phaseName]];
         }
     }
     return $out;
 }
开发者ID:randomresult,项目名称:WMDB.Forger,代码行数:14,代码来源:AbstractGraph.php

示例15: getConfiguredOptionsByProviderName

 /**
  * @param string $providerName
  * @throws \InvalidArgumentException
  * @return array
  */
 protected function getConfiguredOptionsByProviderName($providerName)
 {
     if (!array_key_exists($providerName, $this->providerOptionsByProviderName)) {
         $providerOptions = $this->configurationManager->getConfiguration(ConfigurationManager::CONFIGURATION_TYPE_SETTINGS, sprintf('TYPO3.Flow.security.authentication.providers.%s.providerOptions', $providerName));
         if (!is_array($providerOptions)) {
             throw new \InvalidArgumentException(sprintf('The given provider name "%s" was not properly defined in the Settings (i.e. being defined and having a "providerOptions" key).', $providerName), 1383739910);
         }
         $this->providerOptionsByProviderName[$providerName] = $providerOptions;
     }
     return $this->providerOptionsByProviderName[$providerName];
 }
开发者ID:avency,项目名称:Flowpack.OAuth2.Client,代码行数:16,代码来源:UriBuilder.php


注:本文中的TYPO3\Flow\Configuration\ConfigurationManager::getConfiguration方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。