vendor/pimcore/data-hub-ci-hub/src/PimcoreDataHubCiHubBundle.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\DataHubCiHubBundle;
  12. use Pimcore\Bundle\DataHubBundle\PimcoreDataHubBundle;
  13. use Pimcore\Bundle\DataHubSimpleRestBundle\PimcoreDataHubSimpleRestBundle;
  14. use Pimcore\Bundle\EnterpriseSubscriptionToolsBundle\Bundle\EnterpriseBundleInterface;
  15. use Pimcore\Bundle\EnterpriseSubscriptionToolsBundle\PimcoreEnterpriseSubscriptionToolsBundle;
  16. use Pimcore\Extension\Bundle\AbstractPimcoreBundle;
  17. use Pimcore\Extension\Bundle\Installer\InstallerInterface;
  18. use Pimcore\Extension\Bundle\PimcoreBundleAdminClassicInterface;
  19. use Pimcore\Extension\Bundle\Traits\BundleAdminClassicTrait;
  20. use Pimcore\Extension\Bundle\Traits\PackageVersionTrait;
  21. use Pimcore\HttpKernel\Bundle\DependentBundleInterface;
  22. use Pimcore\HttpKernel\BundleCollection\BundleCollection;
  23. class PimcoreDataHubCiHubBundle extends AbstractPimcoreBundle implements DependentBundleInterfaceEnterpriseBundleInterfacePimcoreBundleAdminClassicInterface
  24. {
  25.     use BundleAdminClassicTrait;
  26.     use PackageVersionTrait;
  27.     /**
  28.      * @return string[]
  29.      */
  30.     public function getJsPaths(): array
  31.     {
  32.         return [
  33.             '/bundles/pimcoredatahubcihub/js/pimcore/adapter/ciHub.js',
  34.             '/bundles/pimcoredatahubcihub/js/pimcore/configuration/configItem.js'
  35.         ];
  36.     }
  37.     /**
  38.      * @return string[]
  39.      */
  40.     public function getCssPaths(): array
  41.     {
  42.         return [
  43.             '/bundles/pimcoredatahubcihub/css/icons.css'
  44.         ];
  45.     }
  46.     /**
  47.      * Register bundles to collection.
  48.      *
  49.      * WARNING: this method will be called as soon as this bundle is added to the collection, independent if
  50.      * it will finally be included due to environment restrictions. If you need to load your dependencies conditionally,
  51.      * specify the environments to use on the collection item.
  52.      *
  53.      */
  54.     public static function registerDependentBundles(BundleCollection $collection): void
  55.     {
  56.         $collection->addBundle(PimcoreDataHubBundle::class, 25);
  57.         $collection->addBundle(PimcoreDataHubSimpleRestBundle::class, 20);
  58.         $collection->addBundle(new PimcoreEnterpriseSubscriptionToolsBundle());
  59.     }
  60.     public function getBundleLicenseId(): string
  61.     {
  62.         return 'DCI';
  63.     }
  64.     protected function getComposerPackageName(): string
  65.     {
  66.         return 'pimcore/data-hub-ci-hub';
  67.     }
  68.     public function getInstaller(): ?InstallerInterface
  69.     {
  70.         return $this->container->get(Installer::class);
  71.     }
  72. }