vendor/pimcore/data-hub-simple-rest/src/PimcoreDataHubSimpleRestBundle.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\DataHubSimpleRestBundle;
  12. use Pimcore\Bundle\DataHubBundle\PimcoreDataHubBundle;
  13. use Pimcore\Bundle\ElasticsearchClientBundle\PimcoreElasticsearchClientBundle;
  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 PimcoreDataHubSimpleRestBundle 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/pimcoredatahubsimplerest/js/pimcore/adapter/simpleRest.js',
  34.             '/bundles/pimcoredatahubsimplerest/js/pimcore/configuration/configItem.js',
  35.             '/bundles/pimcoredatahubsimplerest/js/pimcore/configuration/gridConfigDialog.js'
  36.         ];
  37.     }
  38.     /**
  39.      * @return string[]
  40.      */
  41.     public function getCssPaths(): array
  42.     {
  43.         return [
  44.             '/bundles/pimcoredatahubsimplerest/css/icons.css'
  45.         ];
  46.     }
  47.     /**
  48.      * Register bundles to collection.
  49.      *
  50.      * WARNING: this method will be called as soon as this bundle is added to the collection, independent if
  51.      * it will finally be included due to environment restrictions. If you need to load your dependencies conditionally,
  52.      * specify the environments to use on the collection item.
  53.      *
  54.      * @param BundleCollection $collection
  55.      */
  56.     public static function registerDependentBundles(BundleCollection $collection): void
  57.     {
  58.         $collection->addBundle(PimcoreDataHubBundle::class, 20);
  59.         $collection->addBundle(new PimcoreEnterpriseSubscriptionToolsBundle());
  60.         $collection->addBundle(new PimcoreElasticsearchClientBundle());
  61.     }
  62.     public function getBundleLicenseId(): string
  63.     {
  64.         return 'DSR';
  65.     }
  66.     /**
  67.      * Returns the composer package name used to resolve the version
  68.      *
  69.      * @return string
  70.      */
  71.     protected function getComposerPackageName(): string
  72.     {
  73.         return 'pimcore/data-hub-simple-rest';
  74.     }
  75.     public function getInstaller(): InstallerInterface
  76.     {
  77.         return $this->container->get(Installer::class);
  78.     }
  79. }