public function create(TemplateCreateEvent $event, $eventName, EventDispatcherInterface $dispatcher)
    {
        $template = new TemplateModel();
        
        $template
            ->setDispatcher($dispatcher)
            
            ->setLocale($event->getLocale())
            ->setName($event->getTemplateName())
            
            ->save()
        ;
        
        $event->setTemplate($template);
    }
public function create(TemplateCreateEvent $event, $eventName, EventDispatcherInterface $dispatcher)
    {
        $template = new TemplateModel();
        
        $template
            ->setDispatcher($dispatcher)
            
            ->setLocale($event->getLocale())
            ->setName($event->getTemplateName())
            
            ->save()
        ;
        
        $event->setTemplate($template);
    }
public function create ( TemplateCreateEvent $ event , $ eventName , EventDispatcherInterface $ dispatcher ) { $ template = new TemplateModel ( ) ; $ template -> setDispatcher ( $ dispatcher ) -> setLocale ( $ event -> getLocale ( ) ) -> setName ( $ event -> getTemplateName ( ) ) -> save ( ) ; $ event -> setTemplate ( $ template ) ; }
Create a new template entry

@param \Thelia\Core\Event\Template\TemplateCreateEvent $event
@param $eventName
@param EventDispatcherInterface $dispatcher
Create a new template entry