src/EventListener/EditmodeListener.php line 18

Open in your IDE?
  1. <?php
  2. namespace App\EventListener;
  3. use Pimcore\Event\BundleManager\PathsEvent;
  4. use Pimcore\Event\BundleManagerEvents;
  5. use Symfony\Component\EventDispatcher\EventSubscriberInterface;
  6. class EditmodeListener implements EventSubscriberInterface
  7. {
  8.     public static function getSubscribedEvents():array
  9.     {
  10.         return [
  11.             BundleManagerEvents::EDITMODE_JS_PATHS => 'onEditmodeJSPaths'
  12.         ];
  13.     }
  14.     public function onEditmodeJSPaths(PathsEvent $event)
  15.     {
  16.         $event->setPaths(array_merge($event->getPaths(), [
  17.             '/assets/js/pimcore/editmode.js'
  18.         ]));
  19.     }
  20. }