vendor/pimcore/statistics-explorer/src/PimcoreStatisticsExplorerBundle.php line 30

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\StatisticsExplorerBundle;
  12. use Pimcore\Bundle\ElasticsearchClientBundle\PimcoreElasticsearchClientBundle;
  13. use Pimcore\Bundle\EnterpriseSubscriptionToolsBundle\Bundle\EnterpriseBundleInterface;
  14. use Pimcore\Bundle\EnterpriseSubscriptionToolsBundle\PimcoreEnterpriseSubscriptionToolsBundle;
  15. use Pimcore\Bundle\StatisticsExplorerBundle\DependencyInjection\Compiler\DataSourcePass;
  16. use Pimcore\Bundle\StatisticsExplorerBundle\DependencyInjection\Compiler\UserProviderContextPass;
  17. use Pimcore\Extension\Bundle\AbstractPimcoreBundle;
  18. use Pimcore\Extension\Bundle\Installer\InstallerInterface;
  19. use Pimcore\Extension\Bundle\PimcoreBundleAdminClassicInterface;
  20. use Pimcore\Extension\Bundle\Traits\BundleAdminClassicTrait;
  21. use Pimcore\Extension\Bundle\Traits\PackageVersionTrait;
  22. use Pimcore\HttpKernel\Bundle\DependentBundleInterface;
  23. use Pimcore\HttpKernel\BundleCollection\BundleCollection;
  24. use Symfony\Component\DependencyInjection\ContainerBuilder;
  25. use Symfony\WebpackEncoreBundle\WebpackEncoreBundle;
  26. class PimcoreStatisticsExplorerBundle extends AbstractPimcoreBundle implements DependentBundleInterfaceEnterpriseBundleInterfacePimcoreBundleAdminClassicInterface
  27. {
  28.     use PackageVersionTrait;
  29.     use BundleAdminClassicTrait;
  30.     const TRANSLATION_PREFIX 'statistics_container.';
  31.     public function getJsPaths(): array
  32.     {
  33.         return [];
  34.     }
  35.     /**
  36.      * @param BundleCollection $collection
  37.      */
  38.     public static function registerDependentBundles(BundleCollection $collection): void
  39.     {
  40.         $collection->addBundle(new WebpackEncoreBundle());
  41.         $collection->addBundle(new PimcoreEnterpriseSubscriptionToolsBundle());
  42.         $collection->addBundle(new PimcoreElasticsearchClientBundle());
  43.     }
  44.     /**
  45.      * @return void
  46.      */
  47.     public function build(ContainerBuilder $container)
  48.     {
  49.         $container->addCompilerPass(new DataSourcePass());
  50.         $container->addCompilerPass(new UserProviderContextPass());
  51.     }
  52.     /**
  53.      * @return InstallerInterface|null
  54.      */
  55.     public function getInstaller(): ?InstallerInterface
  56.     {
  57.         return $this->container->get(Installer::class);
  58.     }
  59.     public function getBundleLicenseId(): string
  60.     {
  61.         return 'PSE';
  62.     }
  63.     protected function getComposerPackageName(): string
  64.     {
  65.         return 'pimcore/statistics-explorer';
  66.     }
  67. }