bundles/BlockManagerBundle/EventListener/BlockView/GetTwigBlockContentListener.php
private function getTwigBlockContent(
        TwigBlockDefinitionInterface $blockDefinition,
        Block $block,
        array $parameters
    ): string {
        if (!isset($parameters['twig_template'])) {
            return '';
        }

        if (!$parameters['twig_template'] instanceof ContextualizedTwigTemplate) {
            return '';
        }

        return $parameters['twig_template']->renderBlock(
            $blockDefinition->getTwigBlockName($block)
        );
    }
private function getTwigBlockContent(
        TwigBlockDefinitionInterface $blockDefinition,
        Block $block,
        array $parameters
    ): string {
        if (!isset($parameters['twig_template'])) {
            return '';
        }

        if (!$parameters['twig_template'] instanceof ContextualizedTwigTemplate) {
            return '';
        }

        return $parameters['twig_template']->renderBlock(
            $blockDefinition->getTwigBlockName($block)
        );
    }
private function getTwigBlockContent ( TwigBlockDefinitionInterface $ blockDefinition , Block $ block , array $ parameters ) : string { if ( ! isset ( $ parameters [ 'twig_template' ] ) ) { return '' ; } if ( ! $ parameters [ 'twig_template' ] instanceof ContextualizedTwigTemplate ) { return '' ; } return $ parameters [ 'twig_template' ] -> renderBlock ( $ blockDefinition -> getTwigBlockName ( $ block ) ) ; }
Returns the Twig block content from the provided block.
Returns the Twig block content from the provided block .