<?php
namespace IndabaExtensionBundle;
//test
use Pimcore\Bundle\AdminBundle\DependencyInjection\Compiler\SerializerPass;
use Pimcore\Bundle\AdminBundle\Security\Factory\PreAuthenticatedAdminSessionFactory;
use Symfony\Bundle\SecurityBundle\DependencyInjection\SecurityExtension;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Pimcore\Extension\Bundle\AbstractPimcoreBundle;
class IndabaExtensionBundle extends AbstractPimcoreBundle
{
const PLUGIN_NAME = 'PimcoreExt';
public function build(ContainerBuilder $container)
{
$container->addCompilerPass(new SerializerPass());
/** @var SecurityExtension $extension */
$extension = $container->getExtension('security');
$extension->addAuthenticatorFactory(new PreAuthenticatedAdminSessionFactory());
}
public function getCssPaths()
{
return [
'/bundles/indabaextension/css/admin.css'
];
}
/**
* @return array
*/
public function getJsPaths()
{
return [
'/bundles/indabaextension/js/pimcore/overrides.js',
'/bundles/indabaextension/js/pimcore/asset/tree.js',
'/bundles/indabaextension/js/pimcore/object/tree.js',
'/bundles/indabaextension/js/pimcore/object/tags/advancedManyToManyRelation.js',
'/bundles/indabaextension/js/indabaextension/producttab.js',
'/bundles/indabaextension/js/pimcore/indabaextension.js',
'/bundles/indabaextension/js/pimcore/config.js'
];
}
public function getInstaller()
{
return $this->container->get(Installer::class);
}
}