lib/OSAdmin/src/OSAdminBundleBundle.php line 11

Open in your IDE?
  1. <?php
  2. namespace OSAdmin;
  3. use OSAdmin\CompilerPass\OSAdminCompilerPass;
  4. use OSAdmin\DependencyInjection\OSAdminExtension;
  5. use Symfony\Component\DependencyInjection\Compiler\PassConfig;
  6. use Symfony\Component\DependencyInjection\ContainerBuilder;
  7. use Symfony\Component\HttpKernel\Bundle\Bundle;
  8. class OSAdminBundleBundle extends Bundle
  9. {
  10.     public function build(ContainerBuilder $container)
  11.     {
  12.         $container->addCompilerPass(new OSAdminCompilerPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION100);
  13.     }
  14.     /**
  15.      * Overridden to allow for the custom extension alias.
  16.      */
  17.     public function getContainerExtension(): ?OSAdminExtension
  18.     {
  19.         if (null === $this->extension) {
  20.             $this->extension = new OSAdminExtension();
  21.         }
  22.         return $this->extension;
  23.     }
  24.     public function getPath(): string
  25.     {
  26.         return \dirname(__DIR__);
  27.     }
  28. }