src/Phlexible/Bundle/TeaserBundle/Twig/Extension/TeaserExtension.php
public function renderTeaser(ContentTeaser $teaser, array $parameters = array(), array $options = array())
    {
        $parameters['teaserId'] = $teaser->getId();

        if ($this->requestStack->getMasterRequest()->attributes->get('_preview')) {
            $parameters['preview'] = true;
        }

        $uri = $this->router->generate('teaser_render', $parameters);

        $strategy = isset($options['strategy']) ? $options['strategy'] : 'inline';
        unset($options['strategy']);

        return $this->handler->render($uri, $strategy, $options);
    }
public function renderTeaser(ContentTeaser $teaser, array $parameters = array(), array $options = array())
    {
        $parameters['teaserId'] = $teaser->getId();

        if ($this->requestStack->getMasterRequest()->attributes->get('_preview')) {
            $parameters['preview'] = true;
        }

        $uri = $this->router->generate('teaser_render', $parameters);

        $strategy = isset($options['strategy']) ? $options['strategy'] : 'inline';
        unset($options['strategy']);

        return $this->handler->render($uri, $strategy, $options);
    }
public function renderTeaser ( ContentTeaser $ teaser , array $ parameters = array ( ) , array $ options = array ( ) ) { $ parameters [ 'teaserId' ] = $ teaser -> getId ( ) ; if ( $ this -> requestStack -> getMasterRequest ( ) -> attributes -> get ( '_preview' ) ) { $ parameters [ 'preview' ] = true ; } $ uri = $ this -> router -> generate ( 'teaser_render' , $ parameters ) ; $ strategy = isset ( $ options [ 'strategy' ] ) ? $ options [ 'strategy' ] : 'inline' ; unset ( $ options [ 'strategy' ] ) ; return $ this -> handler -> render ( $ uri , $ strategy , $ options ) ; }
Renders a teaser.

@param ContentTeaser $teaser
@param array         $parameters
@param array         $options

@return string The fragment content

@see FragmentHandler::render()
Renders a teaser .