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

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