<?php
namespace App\EventListener;
use Pimcore\Event\BundleManager\PathsEvent;
use Pimcore\Event\BundleManagerEvents;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
class EditmodeListener implements EventSubscriberInterface
{
public static function getSubscribedEvents():array
{
return [
BundleManagerEvents::EDITMODE_JS_PATHS => 'onEditmodeJSPaths'
];
}
public function onEditmodeJSPaths(PathsEvent $event)
{
$event->setPaths(array_merge($event->getPaths(), [
'/assets/js/pimcore/editmode.js'
]));
}
}