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);
        }
    }