TwigTokenParserThrow
extends AbstractTokenParser
in package
Handles try/catch in template file.
{% throw 404 'Not Found' %}
Table of Contents
Methods
- getTag() : string
- Gets the tag name associated with this token parser.
- parse() : TwigNodeThrow
- Parses a token and returns a node.
Methods
getTag()
Gets the tag name associated with this token parser.
public
getTag() : string
Return values
string —The tag name
parse()
Parses a token and returns a node.
public
parse(Token $token) : TwigNodeThrow
Parameters
- $token : Token