app/Plugin/CategoryDelete42/Event.php line 21

Open in your IDE?
  1. <?php
  2. namespace Plugin\CategoryDelete42;
  3. use Eccube\Event\TemplateEvent;
  4. use Symfony\Component\EventDispatcher\EventSubscriberInterface;
  5. class Event implements EventSubscriberInterface
  6. {
  7.     /**
  8.      * @return array
  9.      */
  10.     public static function getSubscribedEvents()
  11.     {
  12.         return [
  13.             '@admin/Product/category.twig' => 'onAdminProductCategoryTwig',
  14.         ];
  15.     }
  16.     public function onAdminProductCategoryTwig(TemplateEvent $event)
  17.     {
  18.         $event->addSnippet('<script>$(\'a[data-bs-target="#DeleteModal"]\').removeClass("disabled")</script>'false);
  19.     }
  20. }