src/Kernel.php line 30

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. class Kernel extends PimcoreKernel
  18. {
  19.     /**
  20.      * Adds bundles to register to the bundle collection. The collection is able
  21.      * to handle priorities and environment specific bundles.
  22.      *
  23.      * @param BundleCollection $collection
  24.      */
  25.     public function registerBundlesToCollection(BundleCollection $collection)
  26.     {
  27.         if (class_exists('\\App\\App')) {
  28.             $collection->addBundle(new \App\App);
  29.         }
  30.         if (class_exists('\Pimcore\Bundle\LegacyBundle\PimcoreLegacyBundle')) {
  31.             $collection->addBundle(new \Pimcore\Bundle\LegacyBundle\PimcoreLegacyBundle);
  32.         }
  33.         if (class_exists('\Symfony\WebpackEncoreBundle\WebpackEncoreBundle')) {
  34.             $collection->addBundle(new \Symfony\WebpackEncoreBundle\WebpackEncoreBundle());
  35.         }
  36.     }
  37. }