public function getTemplateIdentifier()
    {
        $options = $this->options;
        $contentView = $this->contentView;
        $twig = $this->twig;
        $layout = $this->configResolver->getParameter('view_default_layout', 'ezpublish_legacy');

        return static function (array $params) use ($options, $contentView, $twig, $layout) {
            $contentViewClosure = $contentView->getTemplateIdentifier();
            if (isset($params['noLayout']) && $params['noLayout']) {
                $layout = $options['viewbaseLayout'];
            }
            $twigContentTemplate = <<<EOT
{% extends "{$layout}" %}

{% block {$options['contentBlockName']} %}
{{ viewResult|raw }}
{% endblock %}
EOT;

            return $twig->render(
                $twigContentTemplate,
                $params + [
                    'viewResult' => $contentViewClosure($params),
                ]
            );
        };
    }