Holds the path to the template to be rendered by the view manager and the parameters to inject in it.
The template path can be a closure. In that case, the view manager will invoke it instead of loading a template.
$parameters will be passed to the callable in addition to the Content or Location object (depending on the context).
The prototype of the closure must be :
namespace Foo;
use eZ\Publish\API\Repository\Values\Content\ContentInfo;
use eZ\Publish\API\Repository\Values\Content\Location;
For a content
function ( ContentInfo $contentInfo, array $parameters = array() )
{
Do something to render
Must return a string to display
}
For a location
function ( Location $location, array $parameters = array() )
{
Do something to render
Must return a string to display
}