src/EventListener/AdminAssetsListener.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 AdminAssetsListener implements EventSubscriberInterface
  7. {
  8.     public static function getSubscribedEvents(): array
  9.     {
  10.         return [
  11.             BundleManagerEvents::EDITMODE_CSS_PATHS => 'getEditmodeCssPaths'
  12.         ];
  13.     }
  14.     public function getEditmodeCssPaths(PathsEvent $pathsEvent)
  15.     {
  16.         $pathsEvent->setPaths(array_merge($pathsEvent->getPaths(), [
  17.             '/admin/css/document-editmode.css'
  18.         ]));
  19.     }
  20. }