mapConfigArray() публичный Метод

Proxy to Contextualizer::mapConfigArray().
См. также: ContextualizerInterface::mapConfigArray()
public mapConfigArray ( string $id, array $config, integer $options )
$id string Id of the setting array to map.
$config array Full semantic configuration array for current bundle.
$options integer Bit mask of options (See constants of `ContextualizerInterface`)
Пример #1
0
 /**
  * {@inheritdoc}
  */
 public function load(array $configs, ContainerBuilder $container)
 {
     $configuration = new Configuration();
     $config = $this->processConfiguration($configuration, $configs);
     $loader = new YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
     $loader->load('services.yml');
     $loader->load('rest_services.yml');
     $loader->load('fieldtypes.yml');
     $loader->load('persistence.yml');
     $loader->load('papi.yml');
     $loader->load('default_settings.yml');
     $loader->load('templating.yml');
     $loader->load('view.yml');
     $loader->load('limitations.yml');
     $loader->load('storage_engines/legacy.yml');
     $activatedBundles = array_keys($container->getParameter('kernel.bundles'));
     if (in_array('EzSystemsEzPlatformSolrSearchEngineBundle', $activatedBundles)) {
         $loader->load('storage_engines/solr/criterion_visitors.yml');
     }
     if (in_array('EzPublishLegacySearchEngineBundle', $activatedBundles)) {
         $loader->load('storage_engines/legacy/search_query_handlers.yml');
     }
     $processor = new ConfigurationProcessor($container, 'eztags');
     $processor->mapConfigArray('tag_view_match', $config, ContextualizerInterface::MERGE_FROM_SECOND_LEVEL);
     $processor->mapConfigArray('edit_views', $config, ContextualizerInterface::MERGE_FROM_SECOND_LEVEL);
 }
 /**
  * {@inheritdoc}
  */
 public function load(array $configs, ContainerBuilder $container)
 {
     $configuration = new Configuration();
     $config = $this->processConfiguration($configuration, $configs);
     $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
     $loader->load('services.yml');
     $loader->load('fieldtypes.yml');
     $loader->load('default_settings.yml');
     $processor = new ConfigurationProcessor($container, 'novae_zseo');
     $processor->mapSetting('fieldtype_metas_identifier', $config);
     $processor->mapSetting('fieldtype_metas', $config);
     $processor->mapSetting('google_verification', $config);
     $processor->mapSetting('google_gatracker', $config);
     $processor->mapConfigArray('fieldtype_metas', $config, ContextualizerInterface::MERGE_FROM_SECOND_LEVEL);
     $processor->mapConfigArray('default_metas', $config);
     $processor->mapConfigArray('default_links', $config);
     $processor->mapConfigArray('sitemap_excludes', $config, ContextualizerInterface::MERGE_FROM_SECOND_LEVEL);
     $processor->mapConfigArray('robots_disallow', $config);
 }
 /**
  * {@inheritdoc}
  */
 public function load(array $configs, ContainerBuilder $container)
 {
     $configuration = $this->getConfiguration($configs, $container);
     $config = $this->processConfiguration($configuration, $configs);
     $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
     $loader->load('services.yml');
     $loader->load('value_object_visitors.yml');
     $loader->load('input_parsers.yml');
     $loader->load('security.yml');
     $loader->load('default_settings.yml');
     $processor = new ConfigurationProcessor($container, 'ezsettings');
     $processor->mapConfigArray('rest_root_resources', $config);
 }
Пример #4
0
 /**
  * {@inheritdoc}
  */
 public function load(array $configs, ContainerBuilder $container)
 {
     $configuration = new Configuration();
     $config = $this->processConfiguration($configuration, $configs);
     $loader = new YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
     $loader->load('services.yml');
     $loader->load('fieldtypes.yml');
     $loader->load('persistence.yml');
     $loader->load('papi.yml');
     $loader->load('default_settings.yml');
     $loader->load('templating.yml');
     $loader->load('view.yml');
     $loader->load('storage_engines/legacy/search_query_handlers.yml');
     $loader->load('limitations.yml');
     $loader->load('storage_engines/legacy.yml');
     $loader->load('storage_engines/solr/criterion_visitors.yml');
     $processor = new ConfigurationProcessor($container, 'eztags');
     $processor->mapConfigArray('tag_view_match', $config, ContextualizerInterface::MERGE_FROM_SECOND_LEVEL);
 }
 public function testMapConfigArray()
 {
     $namespace = 'ez_test';
     $saNodeName = 'foo';
     $container = $this->getMock('Symfony\\Component\\DependencyInjection\\ContainerInterface');
     $processor = new ConfigurationProcessor($container, $namespace, $saNodeName);
     $contextualizer = $this->getMock('eZ\\Bundle\\EzPublishCoreBundle\\DependencyInjection\\Configuration\\SiteAccessAware\\ContextualizerInterface');
     $processor->setContextualizer($contextualizer);
     $sa1Config = array('foo' => 'bar', 'hello' => array('world'), 'an_integer' => 123, 'a_bool' => true);
     $sa2Config = array('foo' => 'bar2', 'hello' => array('universe'), 'an_integer' => 456, 'a_bool' => false);
     $config = array('not_sa_aware' => 'blabla', $saNodeName => array('sa1' => $sa1Config, 'sa2' => $sa2Config));
     $contextualizer->expects($this->once())->method('mapConfigArray')->with('hello', $config, ContextualizerInterface::MERGE_FROM_SECOND_LEVEL);
     $processor->mapConfigArray('hello', $config, ContextualizerInterface::MERGE_FROM_SECOND_LEVEL);
 }