Networking\InitCmsBundle\Entity\ContentRouteListener::prePersist PHP Метод

prePersist() публичный Метод

public prePersist ( Doctrine\Common\Persistence\Event\LifecycleEventArgs $args ) : mixed | void
$args Doctrine\Common\Persistence\Event\LifecycleEventArgs
Результат mixed | void
    public function prePersist(LifecycleEventArgs $args)
    {
        $entity = $args->getObject();
        if ($entity instanceof ContentRoute) {
            $template = $this->templates[$entity->getTemplateName()];
            $entity->setTemplate($template['template']);
            $entity->setController($template['controller']);
        }
    }
ContentRouteListener