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

# decideIfEnd()

View source (opens new window)

Arguments

  • $token (\Twig\Token)

Returns

boolean (opens new window)

# decideIfFork()

View source (opens new window)

Arguments

  • $token (\Twig\Token)

Returns

boolean (opens new window)

# getTag()

View source (opens new window)

# parse()

View source (opens new window)

Arguments

  • $token