bundles/IndabaExtensionBundle/IndabaExtensionBundle.php line 11

Open in your IDE?
  1. <?php
  2. namespace IndabaExtensionBundle;
  3. //test
  4. use Pimcore\Bundle\AdminBundle\DependencyInjection\Compiler\SerializerPass;
  5. use Pimcore\Bundle\AdminBundle\Security\Factory\PreAuthenticatedAdminSessionFactory;
  6. use Symfony\Bundle\SecurityBundle\DependencyInjection\SecurityExtension;
  7. use Symfony\Component\DependencyInjection\ContainerBuilder;
  8. use Pimcore\Extension\Bundle\AbstractPimcoreBundle;
  9. class IndabaExtensionBundle extends AbstractPimcoreBundle
  10. {
  11.     const PLUGIN_NAME 'PimcoreExt';
  12.     public function build(ContainerBuilder $container)
  13.     {
  14.         $container->addCompilerPass(new SerializerPass());
  15.         /** @var SecurityExtension $extension */
  16.         $extension $container->getExtension('security');
  17.         $extension->addAuthenticatorFactory(new PreAuthenticatedAdminSessionFactory());
  18.     }
  19.     public function getCssPaths()
  20.     {
  21.         return [
  22.             '/bundles/indabaextension/css/admin.css'
  23.         ];
  24.     }
  25.     /**
  26.      * @return array
  27.      */
  28.     public function getJsPaths()
  29.     {
  30.         return [
  31.             '/bundles/indabaextension/js/pimcore/overrides.js'
  32.             '/bundles/indabaextension/js/pimcore/asset/tree.js',
  33.             '/bundles/indabaextension/js/pimcore/object/tree.js',
  34.             '/bundles/indabaextension/js/pimcore/object/tags/advancedManyToManyRelation.js',
  35.             '/bundles/indabaextension/js/indabaextension/producttab.js',
  36.             '/bundles/indabaextension/js/pimcore/indabaextension.js',
  37.             '/bundles/indabaextension/js/pimcore/config.js'
  38.         ];
  39.     }
  40.     public function getInstaller()
  41.     {
  42.         return $this->container->get(Installer::class);
  43.     }
  44. }