class TemplateReference extends TemplateReference
Internal representation of a template.
protected | $parameters | from TemplateReference |
__construct(string $bundle = null, string $controller = null, string $name = null, string $format = null, string $engine = null) | ||
string | __toString() Returns the string representation as shortcut for getLogicalName(). | from TemplateReference |
$this | set(string $name, string $value) Sets a template parameter. | from TemplateReference |
string | get(string $name) Gets a template parameter. | from TemplateReference |
array | all() Gets the template parameters. | from TemplateReference |
string | getPath() Returns the path to the template - as a path when the template is not part of a bundle - as a resource when the template is part of a bundle. | |
string | getLogicalName() Returns the "logical" template name. |
string | $bundle | |
string | $controller | |
string | $name | |
string | $format | |
string | $engine |
Returns the string representation as shortcut for getLogicalName().
Alias of getLogicalName().
string | The template name |
Sets a template parameter.
string | $name | The parameter name |
string | $value | The parameter value |
$this |
InvalidArgumentException | if the parameter name is not supported |
Gets a template parameter.
string | $name | The parameter name |
string | The parameter value |
InvalidArgumentException | if the parameter name is not supported |
Gets the template parameters.
array | An array of parameters |
Returns the path to the template - as a path when the template is not part of a bundle - as a resource when the template is part of a bundle.
string | A path to the template or a resource |
Returns the "logical" template name.
The template name acts as a unique identifier for the template.
string | The template name |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Bundle/FrameworkBundle/Templating/TemplateReference.html