Exponential 5.x Kernel 7.5.40 Exponential New Stack (Symfony-based) Kernel — PHP Class Reference

EzPublishDebugExtension.php
Go to the documentation of this file.
1 <?php
2
7 namespace eZ\Bundle\EzPublishDebugBundle\DependencyInjection;
8
9 use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface;
10 use Symfony\Component\HttpKernel\DependencyInjection\Extension;
11 use Symfony\Component\DependencyInjection\ContainerBuilder;
12 use Symfony\Component\DependencyInjection\Loader;
13 use Symfony\Component\Config\FileLocator;
14
15 class EzPublishDebugExtension extends Extension implements PrependExtensionInterface
16 {
17 public function load(array $configs, ContainerBuilder $container)
18 {
19 $loader = new Loader\YamlFileLoader(
20 $container,
21 new FileLocator(__DIR__ . '/../Resources/config')
22 );
23
24 // Base services and services overrides
25 $loader->load('services.yml');
26 }
27
31 public function prepend(ContainerBuilder $container)
32 {
33 if ($container->getParameter('kernel.debug')) {
34 $container->prependExtensionConfig(
35 'twig',
36 ['base_template_class' => 'eZ\Bundle\EzPublishDebugBundle\Twig\DebugTemplate']
37 );
38 }
39 }
40 }
eZ\Bundle\EzPublishDebugBundle\DependencyInjection\EzPublishDebugExtension
Definition: EzPublishDebugExtension.php:16
eZ\Bundle\EzPublishDebugBundle\DependencyInjection\EzPublishDebugExtension\prepend
prepend(ContainerBuilder $container)
Sets the twig base template class to this bundle's in order to collect template infos.
Definition: EzPublishDebugExtension.php:31
eZ\Bundle\EzPublishDebugBundle\DependencyInjection\EzPublishDebugExtension\load
load(array $configs, ContainerBuilder $container)
Definition: EzPublishDebugExtension.php:17
$loader
$loader
Definition: containerBuilder.php:25
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.