SwitchTokenParser
- Type
- Class
- Namespace
- craft\web\twig\tokenparsers
- Inherits
- craft\web\twig\tokenparsers\SwitchTokenParser »
Twig\TokenParser\AbstractTokenParser
- Since
- 3.0.0
Class SwitchTokenParser that parses {% switch %} tags.
Based on the rejected Twig pull request: https://github.com/fabpot/Twig/pull/185
View source (opens new window)
# Public Methods
Method | Description |
---|---|
decideIfEnd() | |
decideIfFork() | |
getTag() | |
parse() |
# decideIfEnd()
View source (opens new window)
Arguments
$token
(\Twig\Token
)
Returns
# decideIfFork()
View source (opens new window)
Arguments
$token
(\Twig\Token
)
Returns
# getTag()
View source (opens new window)
# parse()
View source (opens new window)
Arguments
$token