public function tocAction($owner, $ownerId)
    {
        /** @var BlockProviderInterface $provider */
        $provider = $this->get('opifer.content.block_provider_pool')->getProvider($owner);
        $object = $provider->getBlockOwner($ownerId);

        /** @var Environment $environment */
        $environment = $this->get('opifer.content.block_environment');
        $environment->setDraft(true)->setObject($object);
        $environment->setBlockMode('manage');

        $twigAnalyzer = $this->get('opifer.content.twig_analyzer');

        $parameters = [
            'environment' => $environment,
            'analyzer' => $twigAnalyzer,
            'object' => $environment->getObject(),
        ];

        return $this->render('OpiferContentBundle:Content:toc.html.twig', $parameters);
    }
public function tocAction($owner, $ownerId)
    {
        /** @var BlockProviderInterface $provider */
        $provider = $this->get('opifer.content.block_provider_pool')->getProvider($owner);
        $object = $provider->getBlockOwner($ownerId);

        /** @var Environment $environment */
        $environment = $this->get('opifer.content.block_environment');
        $environment->setDraft(true)->setObject($object);
        $environment->setBlockMode('manage');

        $twigAnalyzer = $this->get('opifer.content.twig_analyzer');

        $parameters = [
            'environment' => $environment,
            'analyzer' => $twigAnalyzer,
            'object' => $environment->getObject(),
        ];

        return $this->render('OpiferContentBundle:Content:toc.html.twig', $parameters);
    }
public function tocAction ( $ owner , $ ownerId ) { /** @var BlockProviderInterface $provider */ $ provider = $ this -> get ( 'opifer.content.block_provider_pool' ) -> getProvider ( $ owner ) ; $ object = $ provider -> getBlockOwner ( $ ownerId ) ; /** @var Environment $environment */ $ environment = $ this -> get ( 'opifer.content.block_environment' ) ; $ environment -> setDraft ( true ) -> setObject ( $ object ) ; $ environment -> setBlockMode ( 'manage' ) ; $ twigAnalyzer = $ this -> get ( 'opifer.content.twig_analyzer' ) ; $ parameters = [ 'environment' => $ environment , 'analyzer' => $ twigAnalyzer , 'object' => $ environment -> getObject ( ) , ] ; return $ this -> render ( 'OpiferContentBundle:Content:toc.html.twig' , $ parameters ) ; }
Table of Contents tree

@param string  $owner
@param integer $ownerId

@return Response
Table of Contents tree