Exemplo n.º 1
0
 /**
  * Post load implementation
  *
  * @param ContainerBuilder $container A ContainerBuilder instance
  * @param array            $config    Parsed configuration
  */
 protected function postLoad(array $config, ContainerBuilder $container)
 {
     parent::postLoad($config, $container);
     $container->setAlias('elcodi.media_resize_adapter', $config['images']['resize']['adapter']);
     $container->setAlias('elcodi.media_filesystem', $container->getParameter('elcodi.media_filesystem_service'));
 }
Exemplo n.º 2
0
 /**
  * Post load implementation
  *
  * @param array            $config    Parsed configuration
  * @param ContainerBuilder $container A ContainerBuilder instance
  */
 protected function postLoad(array $config, ContainerBuilder $container)
 {
     parent::postLoad($config, $container);
     $container->setAlias('elcodi.adapter.currency_exchange_rate', $config['rates_provider']['adapter']);
 }
Exemplo n.º 3
0
 /**
  * Post load implementation.
  *
  * @param array            $config    Parsed configuration
  * @param ContainerBuilder $container A ContainerBuilder instance
  */
 protected function postLoad(array $config, ContainerBuilder $container)
 {
     parent::postLoad($config, $container);
     if (!empty($config['renderers'])) {
         $rendererReferences = [];
         foreach ($config['renderers'] as $rendererId) {
             $rendererReferences[] = new Reference($rendererId);
         }
         $controllerId = 'elcodi.page_renderer_chain';
         $controllerDefinition = $container->findDefinition($controllerId);
         $controllerDefinition->addArgument($rendererReferences);
     }
 }
Exemplo n.º 4
0
 /**
  * Post load implementation
  *
  * @param array            $config    Parsed configuration
  * @param ContainerBuilder $container A ContainerBuilder instance
  */
 protected function postLoad(array $config, ContainerBuilder $container)
 {
     parent::postLoad($config, $container);
     $metricsBucketId = $config['bucket']['client'];
     $container->setAlias('elcodi.metrics_bucket', $metricsBucketId);
 }
Exemplo n.º 5
0
 /**
  * Post load implementation.
  *
  * @param array            $config    Parsed configuration
  * @param ContainerBuilder $container A ContainerBuilder instance
  */
 protected function postLoad(array $config, ContainerBuilder $container)
 {
     parent::postLoad($config, $container);
     $locatorProviderId = $config['location']['provider_adapter'];
     $container->setAlias('elcodi.location_provider', $locatorProviderId);
     $locatorPopulatorAdapterId = $config['location']['populator_adapter'];
     $container->setAlias('elcodi.location_populator_adapter', $locatorPopulatorAdapterId);
     $locatorLoaderAdapterId = $config['location']['loader_adapter'];
     $container->setAlias('elcodi.location_loader_adapter', $locatorLoaderAdapterId);
 }
Exemplo n.º 6
0
 /**
  * Hook after load the full container
  *
  * @param array            $config    Configuration
  * @param ContainerBuilder $container Container
  */
 protected function postLoad(array $config, ContainerBuilder $container)
 {
     parent::postLoad($config, $container);
     $this->setupExceptions($config['error_templates'], $container);
 }
Exemplo n.º 7
0
 /**
  * Post load implementation
  *
  * @param array            $config    Parsed configuration
  * @param ContainerBuilder $container A ContainerBuilder instance
  */
 protected function postLoad(array $config, ContainerBuilder $container)
 {
     parent::postLoad($config, $container);
     $relatedProductsAdapterId = $config['related_purchasables_provider']['adapter'];
     $container->setAlias('elcodi.related_purchasables_provider', $relatedProductsAdapterId);
 }