eZ\Publish\Core\MVC\Symfony\View\View::setTemplateIdentifier PHP Method

setTemplateIdentifier() public method

Can be either a valid template identifier such as "MyBundle:subfolder:my_template.html.twig" or a closure. In the case of a closure, it will receive an array of parameters as an argument and must return the result to display. The prototype of the closure must be : function (array $params = []) { Do something to render Must return a string to display } Must throw a \eZ\Publish\Core\Base\Exceptions\InvalidArgumentType exception if $templateIdentifier is invalid.
public setTemplateIdentifier ( string | Closure $templateIdentifier )
$templateIdentifier string | Closure
    public function setTemplateIdentifier($templateIdentifier);