public function onResultTypeServiceLoaded(ResultTypeServiceLoadedEvent $event) { $rts = $event->getResultTypeService(); $rts->addType('php.comments', new PhpTemplateResultType(array('templatesDir' => __DIR__ . '/templates'))); $rts->register('CommentsThread', 'error', 'php.comments', array('file' => 'thread_error.php')); $rts->register('CommentsThread', 'success', 'php.comments', array('file' => 'thread.php')); $rts->register('CommentPost', 'form_error', 'redirect', array('uri' => ':back')); $rts->register('CommentPost', 'success', 'redirect', array('uri' => ':back')); $rts->register('CommentPost', 'form', 'php.comments', array('file' => 'post.php')); }
public function onResultTypeServiceLoaded(ResultTypeServiceLoadedEvent $event) { $rts = $event->getResultTypeService(); $rts->register('CmfPageView', 'cmf:page', 'twig', array('file' => ':template')); }
public function onResultTypeServiceLoaded(ResultTypeServiceLoadedEvent $event) { $event->getResultTypeService()->addType($this->cfg('typeName', 'twig'), new TwigResultType(array('twigService' => $this->cfg('serviceName', 'twig')))); }