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