コード例 #1
0
 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'));
 }
コード例 #2
0
ファイル: CmfPlugin.php プロジェクト: nitronet/fwk-cmf
 public function onResultTypeServiceLoaded(ResultTypeServiceLoadedEvent $event)
 {
     $rts = $event->getResultTypeService();
     $rts->register('CmfPageView', 'cmf:page', 'twig', array('file' => ':template'));
 }
コード例 #3
0
ファイル: TwigPlugin.php プロジェクト: nitronet/fwk-twig
 public function onResultTypeServiceLoaded(ResultTypeServiceLoadedEvent $event)
 {
     $event->getResultTypeService()->addType($this->cfg('typeName', 'twig'), new TwigResultType(array('twigService' => $this->cfg('serviceName', 'twig'))));
 }