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

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