vendor/pimcore/workflow-designer/src/PimcoreWorkflowDesignerBundle.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\WorkflowDesignerBundle;
  12. use Pimcore\Bundle\AdminBundle\PimcoreAdminBundle;
  13. use Pimcore\Bundle\EnterpriseSubscriptionToolsBundle\Bundle\EnterpriseBundleInterface;
  14. use Pimcore\Bundle\EnterpriseSubscriptionToolsBundle\PimcoreEnterpriseSubscriptionToolsBundle;
  15. use Pimcore\Extension\Bundle\AbstractPimcoreBundle;
  16. use Pimcore\Extension\Bundle\Installer\InstallerInterface;
  17. use Pimcore\Extension\Bundle\PimcoreBundleAdminClassicInterface;
  18. use Pimcore\Extension\Bundle\Traits\BundleAdminClassicTrait;
  19. use Pimcore\Extension\Bundle\Traits\PackageVersionTrait;
  20. use Pimcore\HttpKernel\Bundle\DependentBundleInterface;
  21. use Pimcore\HttpKernel\BundleCollection\BundleCollection;
  22. use Symfony\WebpackEncoreBundle\WebpackEncoreBundle;
  23. class PimcoreWorkflowDesignerBundle extends AbstractPimcoreBundle implements DependentBundleInterfaceEnterpriseBundleInterfacePimcoreBundleAdminClassicInterface
  24. {
  25.     const PERMISSION_KEY 'permission_workflow_designer';
  26.     const PERMISSION_KEY_PLACE_PERMISSIONS 'permission_workflow_designer_place_permissions';
  27.     const PERMISSION_KEY_TRANSITION_NOTIFICATIONS 'permission_workflow_designer_trans_notifications';
  28.     const PERMISSIONS = [
  29.         self::PERMISSION_KEY,
  30.         self::PERMISSION_KEY_PLACE_PERMISSIONS,
  31.         self::PERMISSION_KEY_TRANSITION_NOTIFICATIONS
  32.     ];
  33.     use BundleAdminClassicTrait;
  34.     use PackageVersionTrait;
  35.     protected function getComposerPackageName(): string
  36.     {
  37.         return 'pimcore/workflow-designer';
  38.     }
  39.     public function getJsPaths(): array
  40.     {
  41.         return [
  42.             '/bundles/pimcoreworkflowdesigner/js/pimcore/startup.js',
  43.             '/bundles/pimcoreworkflowdesigner/js/pimcore/ext_extensions.js',
  44.             '/bundles/pimcoreworkflowdesigner/js/pimcore/configuration/configurationTree.js',
  45.             '/bundles/pimcoreworkflowdesigner/js/pimcore/configuration/configurationItem.js',
  46.             '/bundles/pimcoreworkflowdesigner/js/pimcore/configuration/item/placeSettings.js',
  47.             '/bundles/pimcoreworkflowdesigner/js/pimcore/configuration/item/transitionSettings.js',
  48.             '/bundles/pimcoreworkflowdesigner/js/pimcore/configuration/item/globalActionSettings.js',
  49.         ];
  50.     }
  51.     public function getCssPaths(): array
  52.     {
  53.         return [
  54.             '/bundles/pimcoreworkflowdesigner/css/admin.css',
  55.         ];
  56.     }
  57.     public static function registerDependentBundles(BundleCollection $collection): void
  58.     {
  59.         $collection->addBundle(new WebpackEncoreBundle());
  60.         $collection->addBundle(new PimcoreEnterpriseSubscriptionToolsBundle());
  61.         $collection->addBundle(new PimcoreAdminBundle(), 60);
  62.     }
  63.     /**
  64.      * @return Installer
  65.      */
  66.     public function getInstaller(): InstallerInterface
  67.     {
  68.         return $this->container->get(Installer::class);
  69.     }
  70.     public function getBundleLicenseId(): string
  71.     {
  72.         return 'WFD';
  73.     }
  74. }