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

                ->setName($event->getMessageName())
                ->setSecured($event->getSecured())

                ->setLocale($event->getLocale())

                ->setTitle($event->getTitle())
                ->setSubject($event->getSubject())

                ->setHtmlMessage($event->getHtmlMessage())
                ->setTextMessage($event->getTextMessage())

                ->setHtmlLayoutFileName($event->getHtmlLayoutFileName())
                ->setHtmlTemplateFileName($event->getHtmlTemplateFileName())
                ->setTextLayoutFileName($event->getTextLayoutFileName())
                ->setTextTemplateFileName($event->getTextTemplateFileName())

                ->save();

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

                ->setName($event->getMessageName())
                ->setSecured($event->getSecured())

                ->setLocale($event->getLocale())

                ->setTitle($event->getTitle())
                ->setSubject($event->getSubject())

                ->setHtmlMessage($event->getHtmlMessage())
                ->setTextMessage($event->getTextMessage())

                ->setHtmlLayoutFileName($event->getHtmlLayoutFileName())
                ->setHtmlTemplateFileName($event->getHtmlTemplateFileName())
                ->setTextLayoutFileName($event->getTextLayoutFileName())
                ->setTextTemplateFileName($event->getTextTemplateFileName())

                ->save();

            $event->setMessage($message);
        }
    }
public function modify ( MessageUpdateEvent $ event , $ eventName , EventDispatcherInterface $ dispatcher ) { if ( null !== $ message = MessageQuery :: create ( ) -> findPk ( $ event -> getMessageId ( ) ) ) { $ message -> setDispatcher ( $ dispatcher ) -> setName ( $ event -> getMessageName ( ) ) -> setSecured ( $ event -> getSecured ( ) ) -> setLocale ( $ event -> getLocale ( ) ) -> setTitle ( $ event -> getTitle ( ) ) -> setSubject ( $ event -> getSubject ( ) ) -> setHtmlMessage ( $ event -> getHtmlMessage ( ) ) -> setTextMessage ( $ event -> getTextMessage ( ) ) -> setHtmlLayoutFileName ( $ event -> getHtmlLayoutFileName ( ) ) -> setHtmlTemplateFileName ( $ event -> getHtmlTemplateFileName ( ) ) -> setTextLayoutFileName ( $ event -> getTextLayoutFileName ( ) ) -> setTextTemplateFileName ( $ event -> getTextTemplateFileName ( ) ) -> save ( ) ; $ event -> setMessage ( $ message ) ; } }
Change a message

@param \Thelia\Core\Event\Message\MessageUpdateEvent $event
@param $eventName
@param EventDispatcherInterface $dispatcher
Change a message