public function create(MessageCreateEvent $event, $eventName, EventDispatcherInterface $dispatcher)
    {
        $message = new MessageModel();

        $message
            ->setDispatcher($dispatcher)

            ->setName($event->getMessageName())
            ->setLocale($event->getLocale())
            ->setTitle($event->getTitle())
            ->setSecured($event->getSecured())

            ->save()
        ;

        $event->setMessage($message);
    }
public function create(MessageCreateEvent $event, $eventName, EventDispatcherInterface $dispatcher)
    {
        $message = new MessageModel();

        $message
            ->setDispatcher($dispatcher)

            ->setName($event->getMessageName())
            ->setLocale($event->getLocale())
            ->setTitle($event->getTitle())
            ->setSecured($event->getSecured())

            ->save()
        ;

        $event->setMessage($message);
    }
public function create ( MessageCreateEvent $ event , $ eventName , EventDispatcherInterface $ dispatcher ) { $ message = new MessageModel ( ) ; $ message -> setDispatcher ( $ dispatcher ) -> setName ( $ event -> getMessageName ( ) ) -> setLocale ( $ event -> getLocale ( ) ) -> setTitle ( $ event -> getTitle ( ) ) -> setSecured ( $ event -> getSecured ( ) ) -> save ( ) ; $ event -> setMessage ( $ message ) ; }
Create a new messageuration entry

@param \Thelia\Core\Event\Message\MessageCreateEvent $event
@param $eventName
@param EventDispatcherInterface $dispatcher
Create a new messageuration entry