public function delete(MessageDeleteEvent $event, $eventName, EventDispatcherInterface $dispatcher)
    {
        if (null !== ($message = MessageQuery::create()->findPk($event->getMessageId()))) {
            $message
                ->setDispatcher($dispatcher)
                ->delete()
            ;

            $event->setMessage($message);
        }
    }
public function delete(MessageDeleteEvent $event, $eventName, EventDispatcherInterface $dispatcher)
    {
        if (null !== ($message = MessageQuery::create()->findPk($event->getMessageId()))) {
            $message
                ->setDispatcher($dispatcher)
                ->delete()
            ;

            $event->setMessage($message);
        }
    }
public function delete ( MessageDeleteEvent $ event , $ eventName , EventDispatcherInterface $ dispatcher ) { if ( null !== ( $ message = MessageQuery :: create ( ) -> findPk ( $ event -> getMessageId ( ) ) ) ) { $ message -> setDispatcher ( $ dispatcher ) -> delete ( ) ; $ event -> setMessage ( $ message ) ; } }
Delete a messageuration entry

@param \Thelia\Core\Event\Message\MessageDeleteEvent $event
@param $eventName
@param EventDispatcherInterface $dispatcher
Delete a messageuration entry