public function update(TemplateUpdateEvent $event, $eventName, EventDispatcherInterface $dispatcher)
    {
        if (null !== $template = TemplateQuery::create()->findPk($event->getTemplateId())) {
            $template
                ->setDispatcher($dispatcher)
                
                ->setLocale($event->getLocale())
                ->setName($event->getTemplateName())
                ->save();
            
            $event->setTemplate($template);
        }
    }
public function update(TemplateUpdateEvent $event, $eventName, EventDispatcherInterface $dispatcher)
    {
        if (null !== $template = TemplateQuery::create()->findPk($event->getTemplateId())) {
            $template
                ->setDispatcher($dispatcher)
                
                ->setLocale($event->getLocale())
                ->setName($event->getTemplateName())
                ->save();
            
            $event->setTemplate($template);
        }
    }
public function update ( TemplateUpdateEvent $ event , $ eventName , EventDispatcherInterface $ dispatcher ) { if ( null !== $ template = TemplateQuery :: create ( ) -> findPk ( $ event -> getTemplateId ( ) ) ) { $ template -> setDispatcher ( $ dispatcher ) -> setLocale ( $ event -> getLocale ( ) ) -> setName ( $ event -> getTemplateName ( ) ) -> save ( ) ; $ event -> setTemplate ( $ template ) ; } }
Change a product template

@param \Thelia\Core\Event\Template\TemplateUpdateEvent $event
@param $eventName
@param EventDispatcherInterface $dispatcher
Change a product template