TwigTokenParserStyle
extends AbstractTokenParser
in package
Adds a style to the document.
{% style 'theme://css/foo.css' priority: 20 %}
{% style priority: 20 with { media: 'screen' } %} a { color: red; } {% endstyle %}
Table of Contents
Methods
- decideBlockEnd() : bool
- getTag() : string
- Gets the tag name associated with this token parser.
- parse() : TwigNodeStyle
- Parses a token and returns a node.
- parseArguments() : array<string|int, mixed>
Methods
decideBlockEnd()
public
decideBlockEnd(Token $token) : bool
Parameters
- $token : Token
Return values
boolgetTag()
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) : TwigNodeStyle
Parameters
- $token : Token
Tags
Return values
TwigNodeStyleparseArguments()
protected
parseArguments(Token $token) : array<string|int, mixed>
Parameters
- $token : Token