Cms\Twig\TokenParser\PartialTokenParser
Overview
PartialTokenParser for the {% partial %} Twig tag.
Example usage:
{% partial "sidebar" %}
{% partial "sidebar" name='John' %}
{% partial "sidebar" name='John' year=2013 %}
Extends
- Twig\TokenParser\AbstractTokenParser
Implements
- Twig\TokenParser\TokenParserInterface
Protected Properties
There are no protected properties in the class.
Show inherited protected properties
Inherited Protected Properties
- $parser - (defined in Twig\TokenParser\AbstractTokenParser)
Public Methods
public decidePartialEnd()
public decidePartialEnd($token): void
Determines if the token marks the end of the partial block.
public getTag()
public getTag(): string
Returns the tag name associated with this token parser.
public parse()
public parse($token): PartialNode
Parses a token and returns a node.
Inherited Public Methods
- isAlwaysAllowedInSandbox() - (defined in Twig\TokenParser\AbstractTokenParser)
- setParser() - (defined in Twig\TokenParser\AbstractTokenParser)
Protected Methods
Show inherited protected methods
Inherited Protected Methods
- parseAssignmentExpression() - Parses an assignment expression like "a, b". (defined in Twig\TokenParser\AbstractTokenParser)