vendor/pimcore/perspective-editor/src/PimcorePerspectiveEditorBundle.php line 27

Open in your IDE?
  1. <?php
  2. /**
  3.  * Pimcore
  4.  *
  5.  * This source file is available under two different licenses:
  6.  * - GNU General Public License version 3 (GPLv3)
  7.  * - Pimcore Commercial License (PCL)
  8.  * Full copyright and license information is available in
  9.  * LICENSE.md which is distributed with this source code.
  10.  *
  11.  *  @copyright  Copyright (c) Pimcore GmbH (http://www.pimcore.org)
  12.  *  @license    http://www.pimcore.org/license     GPLv3 and PCL
  13.  */
  14. namespace Pimcore\Bundle\PerspectiveEditorBundle;
  15. use Pimcore\Bundle\AdminBundle\PimcoreAdminBundle;
  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 PimcorePerspectiveEditorBundle extends AbstractPimcoreBundle implements PimcoreBundleAdminClassicInterfaceDependentBundleInterface
  24. {
  25.     use BundleAdminClassicTrait;
  26.     use PackageVersionTrait;
  27.     const PERMISSION_PERSPECTIVE_EDITOR 'perspective_editor';
  28.     const PERMISSION_PERSPECTIVE_EDITOR_VIEW_EDIT 'perspective_editor_view_edit';
  29.     public static function registerDependentBundles(BundleCollection $collection): void
  30.     {
  31.         $collection->addBundle(new PimcoreAdminBundle(), 60);
  32.     }
  33.     public function getJsPaths(): array
  34.     {
  35.         return [
  36.             '/bundles/pimcoreperspectiveeditor/js/pimcore/perspective/menuItemPermissionHelper.js',
  37.             '/bundles/pimcoreperspectiveeditor/js/pimcore/perspective/perspective.js',
  38.             '/bundles/pimcoreperspectiveeditor/js/pimcore/perspective/view.js',
  39.             '/bundles/pimcoreperspectiveeditor/js/pimcore/perspective/common.js',
  40.             '/bundles/pimcoreperspectiveeditor/js/pimcore/perspective/startup.js',
  41.             '/bundles/pimcoreperspectiveeditor/js/pimcore/perspective/events.js',
  42.         ];
  43.     }
  44.     public function getCssPaths(): array
  45.     {
  46.         return [
  47.             '/bundles/pimcoreperspectiveeditor/css/icons.css'
  48.         ];
  49.     }
  50.     protected function getComposerPackageName(): string
  51.     {
  52.         return 'pimcore/perspective-editor';
  53.     }
  54.     public function getInstaller(): InstallerInterface
  55.     {
  56.         return $this->container->get(Installer::class);
  57.     }
  58. }