vendor/sulu/sulu/src/Sulu/Bundle/CategoryBundle/SuluCategoryBundle.php line 28

Open in your IDE?
  1. <?php
  2. /*
  3.  * This file is part of Sulu.
  4.  *
  5.  * (c) Sulu GmbH
  6.  *
  7.  * This source file is subject to the MIT license that is bundled
  8.  * with this source code in the file LICENSE.
  9.  */
  10. namespace Sulu\Bundle\CategoryBundle;
  11. use Sulu\Bundle\CategoryBundle\DependencyInjection\DeprecationCompilerPass;
  12. use Sulu\Bundle\CategoryBundle\Entity\CategoryInterface;
  13. use Sulu\Bundle\CategoryBundle\Entity\CategoryMetaInterface;
  14. use Sulu\Bundle\CategoryBundle\Entity\CategoryTranslationInterface;
  15. use Sulu\Bundle\CategoryBundle\Entity\KeywordInterface;
  16. use Sulu\Bundle\PersistenceBundle\PersistenceBundleTrait;
  17. use Symfony\Component\DependencyInjection\ContainerBuilder;
  18. use Symfony\Component\HttpKernel\Bundle\Bundle;
  19. /**
  20.  * Entry point for the SuluCategoryBundle.
  21.  *
  22.  * @final
  23.  */
  24. class SuluCategoryBundle extends Bundle
  25. {
  26.     use PersistenceBundleTrait;
  27.     /**
  28.      * @internal
  29.      */
  30.     public function build(ContainerBuilder $container): void
  31.     {
  32.         $this->buildPersistence(
  33.             [
  34.                 CategoryInterface::class => 'sulu.model.category.class',
  35.                 CategoryMetaInterface::class => 'sulu.model.category_meta.class',
  36.                 CategoryTranslationInterface::class => 'sulu.model.category_translation.class',
  37.                 KeywordInterface::class => 'sulu.model.keyword.class',
  38.             ],
  39.             $container
  40.         );
  41.         $container->addCompilerPass(new DeprecationCompilerPass());
  42.     }
  43. }