vendor/pimcore/portal-engine/src/PimcorePortalEngineBundle.php line 41

Open in your IDE?
  1. <?php
  2. /**
  3.  * Pimcore
  4.  *
  5.  * This source file is available under following license:
  6.  * - Pimcore Commercial License (PCL)
  7.  *
  8.  *  @copyright  Copyright (c) Pimcore GmbH (http://www.pimcore.org)
  9.  *  @license    http://www.pimcore.org/license     PCL
  10.  */
  11. namespace Pimcore\Bundle\PortalEngineBundle;
  12. use FrontendPermissionToolkitBundle\FrontendPermissionToolkitBundle;
  13. use League\FlysystemBundle\FlysystemBundle;
  14. use Pimcore\Bundle\EnterpriseSubscriptionToolsBundle\Bundle\EnterpriseBundleInterface;
  15. use Pimcore\Bundle\EnterpriseSubscriptionToolsBundle\PimcoreEnterpriseSubscriptionToolsBundle;
  16. use Pimcore\Bundle\PortalEngineBundle\DependencyInjection\Compiler\BatchTaskProcessNotificationActionPass;
  17. use Pimcore\Bundle\PortalEngineBundle\DependencyInjection\Compiler\DataPoolPass;
  18. use Pimcore\Bundle\PortalEngineBundle\DependencyInjection\Compiler\DirectEditCompilerPass;
  19. use Pimcore\Bundle\PortalEngineBundle\DependencyInjection\Compiler\DownloadFormatPass;
  20. use Pimcore\Bundle\PortalEngineBundle\DependencyInjection\Compiler\DownloadGeneratorPass;
  21. use Pimcore\Bundle\PortalEngineBundle\DependencyInjection\Compiler\DownloadProviderPass;
  22. use Pimcore\Bundle\PortalEngineBundle\DependencyInjection\Compiler\PreConditionPass;
  23. use Pimcore\Bundle\PortalEngineBundle\DependencyInjection\Compiler\RestApiFieldDefinitionPass;
  24. use Pimcore\Bundle\PortalEngineBundle\DependencyInjection\Compiler\SearchIndexFieldDefinitionPass;
  25. use Pimcore\Bundle\StatisticsExplorerBundle\PimcoreStatisticsExplorerBundle;
  26. use Pimcore\Extension\Bundle\AbstractPimcoreBundle;
  27. use Pimcore\Extension\Bundle\Traits\PackageVersionTrait;
  28. use Pimcore\HttpKernel\Bundle\DependentBundleInterface;
  29. use Pimcore\HttpKernel\BundleCollection\BundleCollection;
  30. use Symfony\Component\DependencyInjection\ContainerBuilder;
  31. use Symfony\WebpackEncoreBundle\WebpackEncoreBundle;
  32. /**
  33.  * Class PimcorePortalEngineBundle
  34.  *
  35.  * @package Pimcore\Bundle\PortalEngineBundle
  36.  */
  37. class PimcorePortalEngineBundle extends AbstractPimcoreBundle implements DependentBundleInterfaceEnterpriseBundleInterface
  38. {
  39.     use PackageVersionTrait;
  40.     /**
  41.      * @var array
  42.      */
  43.     protected static $config;
  44.     /**
  45.      * @return array|\Pimcore\Routing\RouteReferenceInterface[]|string[]
  46.      */
  47.     public function getJsPaths()
  48.     {
  49.         return [
  50.             '/bundles/pimcoreportalengine/js/pimcore/startup.js',
  51.             '/bundles/pimcoreportalengine/js/pimcore/collections/tree.js',
  52.             '/bundles/pimcoreportalengine/js/pimcore/collections/list.js',
  53.             '/bundles/pimcoreportalengine/js/pimcore/collections/openTreeStorage.js',
  54.             '/bundles/pimcoreportalengine/js/pimcore/wizard/helpers.js',
  55.             '/bundles/pimcoreportalengine/js/pimcore/wizard/wizard.js',
  56.             '/bundles/pimcoreportalengine/js/pimcore/wizard/data-pool/asset.js',
  57.             '/bundles/pimcoreportalengine/js/pimcore/wizard/data-pool/data-object.js'
  58.         ];
  59.     }
  60.     public function getCssPaths()
  61.     {
  62.         return [
  63.             '/bundles/pimcoreportalengine/css/admin.css'
  64.         ];
  65.     }
  66.     public function getEditmodeCssPaths()
  67.     {
  68.         return [
  69.             '/bundles/pimcoreportalengine/css/editmode.css'
  70.         ];
  71.     }
  72.     public function getEditmodeJsPaths()
  73.     {
  74.         return [
  75.             '/bundles/pimcoreportalengine/js/editmode.js'
  76.         ];
  77.     }
  78.     /**
  79.      * @param BundleCollection $collection
  80.      */
  81.     public static function registerDependentBundles(BundleCollection $collection)
  82.     {
  83.         $collection->addBundle(new WebpackEncoreBundle());
  84.         $collection->addBundle(new FrontendPermissionToolkitBundle());
  85.         $collection->addBundle(new PimcoreStatisticsExplorerBundle());
  86.         $collection->addBundle(new PimcoreEnterpriseSubscriptionToolsBundle());
  87.         $collection->addBundle(new FlysystemBundle());
  88.     }
  89.     /**
  90.      * @return Installer
  91.      */
  92.     public function getInstaller()
  93.     {
  94.         return $this->container->get(Installer::class);
  95.     }
  96.     /**
  97.      * @param ContainerBuilder $container
  98.      */
  99.     public function build(ContainerBuilder $container)
  100.     {
  101.         $container
  102.             ->addCompilerPass(new SearchIndexFieldDefinitionPass())
  103.             ->addCompilerPass(new RestApiFieldDefinitionPass())
  104.             ->addCompilerPass(new PreConditionPass())
  105.             ->addCompilerPass(new DownloadFormatPass())
  106.             ->addCompilerPass(new DataPoolPass())
  107.             ->addCompilerPass(new DownloadProviderPass())
  108.             ->addCompilerPass(new DownloadGeneratorPass())
  109.             ->addCompilerPass(new BatchTaskProcessNotificationActionPass())
  110.             ->addCompilerPass(new DirectEditCompilerPass());
  111.     }
  112.     public function getBundleLicenseId(): string
  113.     {
  114.         return 'PPE';
  115.     }
  116.     /**
  117.      * {@inheritdoc}
  118.      */
  119.     protected function getComposerPackageName(): string
  120.     {
  121.         return 'pimcore/portal-engine';
  122.     }
  123. }