vendor/pimcore/pimcore/bundles/AdminBundle/PimcoreAdminBundle.php line 27

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 Pimcore\Bundle\AdminBundle;
  15. use Pimcore\Bundle\AdminBundle\DependencyInjection\Compiler\GDPRDataProviderPass;
  16. use Pimcore\Bundle\AdminBundle\DependencyInjection\Compiler\ImportExportLocatorsPass;
  17. use Pimcore\Bundle\AdminBundle\DependencyInjection\Compiler\SerializerPass;
  18. use Pimcore\Bundle\AdminBundle\DependencyInjection\Compiler\TranslationServicesPass;
  19. use Pimcore\Bundle\AdminBundle\GDPR\DataProvider\DataProviderInterface;
  20. use Pimcore\Bundle\AdminBundle\Security\Factory\PreAuthenticatedAdminSessionFactory;
  21. use Symfony\Bundle\SecurityBundle\DependencyInjection\SecurityExtension;
  22. use Symfony\Component\DependencyInjection\ContainerBuilder;
  23. use Symfony\Component\HttpKernel\Bundle\Bundle;
  24. class PimcoreAdminBundle extends Bundle
  25. {
  26.     /**
  27.      * @inheritDoc
  28.      */
  29.     public function build(ContainerBuilder $container)
  30.     {
  31.         // auto-tag GDPR data providers
  32.         $container
  33.             ->registerForAutoconfiguration(DataProviderInterface::class)
  34.             ->addTag('pimcore.gdpr.data-provider');
  35.         $container->addCompilerPass(new SerializerPass());
  36.         $container->addCompilerPass(new GDPRDataProviderPass());
  37.         $container->addCompilerPass(new ImportExportLocatorsPass());
  38.         $container->addCompilerPass(new TranslationServicesPass());
  39.         /** @var SecurityExtension $extension */
  40.         $extension $container->getExtension('security');
  41.         $extension->addSecurityListenerFactory(new PreAuthenticatedAdminSessionFactory());
  42.     }
  43. }