From 943bec5eeebd1d37c152aee03449be1b0d65c9bf Mon Sep 17 00:00:00 2001 From: nilov Date: Tue, 1 Nov 2016 12:15:00 +0700 Subject: [PATCH] Fixed bug with remove entity. --- Entity/Listener/MediaListener.php | 2 +- Resources/config/doctrine/Media.orm.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Entity/Listener/MediaListener.php b/Entity/Listener/MediaListener.php index fdde57a..5370aa5 100644 --- a/Entity/Listener/MediaListener.php +++ b/Entity/Listener/MediaListener.php @@ -29,7 +29,7 @@ public function __construct(UploaderManager $uploaderManager) * @param Media $media * @param LifecycleEventArgs $event */ - public function postRemoveHandler(Media $media, LifecycleEventArgs $event) + public function preRemoveHandler(Media $media, LifecycleEventArgs $event) { $this->uploaderManager->removeMediaFromStorage($media); } diff --git a/Resources/config/doctrine/Media.orm.xml b/Resources/config/doctrine/Media.orm.xml index c5de1de..3169b7e 100644 --- a/Resources/config/doctrine/Media.orm.xml +++ b/Resources/config/doctrine/Media.orm.xml @@ -15,7 +15,7 @@ - +