<?php
namespace App\Event\Media\Category;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
class DeleteSubscriber implements EventSubscriberInterface
{
public static function getSubscribedEvents()
{
return [
'media_category.pre_delete' => 'onPreDelete',
'media_category.post_delete' => 'onPostDelete'
];
}
public function onPreDelete(PreDeleteEvent $event)
{
// $category = $event->getCategory();
}
public function onPostDelete(PostDeleteEvent $event)
{
// $category = $event->getCategory();
}
}