vendor/sulu/sulu/src/Sulu/Bundle/SecurityBundle/SuluSecurityBundle.php line 21

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\SecurityBundle;
  11. use Sulu\Bundle\PersistenceBundle\PersistenceBundleTrait;
  12. use Sulu\Bundle\SecurityBundle\DependencyInjection\Compiler\AccessControlProviderPass;
  13. use Sulu\Bundle\SecurityBundle\DependencyInjection\Compiler\AliasForSecurityEncoderCompilerPass;
  14. use Sulu\Bundle\SecurityBundle\DependencyInjection\Compiler\UserManagerCompilerPass;
  15. use Symfony\Component\DependencyInjection\ContainerBuilder;
  16. use Symfony\Component\HttpKernel\Bundle\Bundle;
  17. class SuluSecurityBundle extends Bundle
  18. {
  19.     use PersistenceBundleTrait;
  20.     public function build(ContainerBuilder $container)
  21.     {
  22.         $this->buildPersistence(
  23.             [
  24.                 'Sulu\Component\Security\Authentication\UserInterface' => 'sulu.model.user.class',
  25.                 'Sulu\Component\Security\Authentication\RoleInterface' => 'sulu.model.role.class',
  26.                 'Sulu\Component\Security\Authentication\RoleSettingInterface' => 'sulu.model.role_setting.class',
  27.                 'Sulu\Component\Security\Authorization\AccessControl\AccessControlInterface' => 'sulu.model.access_control.class',
  28.             ],
  29.             $container
  30.         );
  31.         $container->addCompilerPass(new UserManagerCompilerPass());
  32.         $container->addCompilerPass(new AccessControlProviderPass());
  33.         $container->addCompilerPass(new AliasForSecurityEncoderCompilerPass());
  34.         parent::build($container);
  35.     }
  36. }