vendor/sulu/community-bundle/SuluCommunityBundle.php line 25

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\CommunityBundle;
  11. use Sulu\Bundle\CommunityBundle\DependencyInjection\CompilerPass\CommunityManagerCompilerPass;
  12. use Sulu\Bundle\CommunityBundle\DependencyInjection\CompilerPass\CommunityValidatorCompilerPass;
  13. use Sulu\Bundle\CommunityBundle\Entity\BlacklistItem;
  14. use Sulu\Bundle\CommunityBundle\Entity\BlacklistUser;
  15. use Sulu\Bundle\PersistenceBundle\PersistenceBundleTrait;
  16. use Symfony\Component\DependencyInjection\ContainerBuilder;
  17. use Symfony\Component\HttpKernel\Bundle\Bundle;
  18. /**
  19.  * Register the bundles compiler passes.
  20.  */
  21. class SuluCommunityBundle extends Bundle
  22. {
  23.     use PersistenceBundleTrait;
  24.     public function build(ContainerBuilder $container): void
  25.     {
  26.         $this->buildPersistence(
  27.             [
  28.                 BlacklistItem::class => 'sulu.model.blacklist_item.class',
  29.                 BlacklistUser::class => 'sulu.model.blacklist_user.class',
  30.             ],
  31.             $container
  32.         );
  33.         $container->addCompilerPass(new CommunityManagerCompilerPass());
  34.         $container->addCompilerPass(new CommunityValidatorCompilerPass());
  35.     }
  36. }