Skip to content

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

Public Methods ​

MethodDescription
decideIfEnd()
decideIfFork()
getTag()
parse()

decideIfEnd() ​

View source

Arguments ​

  • $token (\Twig\Token)

Returns ​

boolean

decideIfFork() ​

View source

Arguments ​

  • $token (\Twig\Token)

Returns ​

boolean

getTag() ​

View source

parse() ​

View source

Arguments ​

  • $token