src/Kernel.php line 32

Open in your IDE?
  1. <?php
  2. /**
  3.  * Pimcore
  4.  *
  5.  * This source file is available under two different licenses:
  6.  * - GNU General Public License version 3 (GPLv3)
  7.  * - Pimcore Enterprise License (PEL)
  8.  * Full copyright and license information is available in
  9.  * LICENSE.md which is distributed with this source code.
  10.  *
  11.  * @copyright  Copyright (c) Pimcore GmbH (http://www.pimcore.org)
  12.  * @license    http://www.pimcore.org/license     GPLv3 and PEL
  13.  */
  14. namespace App;
  15. use Pimcore\HttpKernel\BundleCollection\BundleCollection;
  16. use Pimcore\Kernel as PimcoreKernel;
  17. use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
  18. class Kernel extends PimcoreKernel
  19. {
  20.     /**
  21.      * Adds bundles to register to the bundle collection. The collection is able
  22.      * to handle priorities and environment specific bundles.
  23.      *
  24.      * @param BundleCollection $collection
  25.      */
  26.     public function registerBundlesToCollection(BundleCollection $collection)
  27.     {
  28.         if (class_exists('\\App\\Bundle\\DataHubBundle\\DataHubBundle')) {
  29.             $collection->addBundle(new \App\Bundle\DataHubBundle\DataHubBundle);
  30.         }
  31.     }
  32.     protected function configureContainer(ContainerConfigurator $container): void
  33.     {
  34.         parent::configureContainer($container);
  35.         $projectDir realpath($this->getProjectDir());
  36.         $container->import($projectDir '/config/parameters/*.yaml');
  37.         $container->import($projectDir '/config/parameters/' $this->environment '/*.yaml');
  38.     }
  39. }