src/Event/News/Category/DeleteSubscriber.php line 16

Open in your IDE?
  1. <?php
  2. namespace App\Event\News\Category;
  3. use Symfony\Component\EventDispatcher\EventSubscriberInterface;
  4. class DeleteSubscriber implements EventSubscriberInterface
  5. {
  6.     public static function getSubscribedEvents()
  7.     {
  8.         return [
  9.             'news_category.pre_delete' => 'onPreDelete',
  10.             'news_category.post_delete' => 'onPostDelete'
  11.         ];
  12.     }
  13.     
  14.     public function onPreDelete(PreDeleteEvent $event)
  15.     {
  16.         // $category = $event->getCategory();
  17.     }
  18.     
  19.     public function onPostDelete(PostDeleteEvent $event)
  20.     {
  21.         // $category = $event->getCategory();
  22.     }
  23. }