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

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