Class yii\twig\html\CssStyle_TokenParser

Inheritanceyii\twig\html\CssStyle_TokenParser » yii\twig\html\BaseCss_TokenParser » Twig\TokenParser\AbstractTokenParser
Source Code https://github.com/yiisoft/yii2-twig/blob/master/html/CssStyle_TokenParser.php

Method Details

Hide inherited methods

getNodeClass() public method

public void getNodeClass ( )

                public function getNodeClass()
{
    return '\yii\twig\html\StyleClassNode';
}

            
getTag() public method

public void getTag ( )

                public function getTag()
{
    return 'css_style';
}

            
parse() public method
public void parse ( \Twig\Token $token )
$token

                public function parse(Token $token)
{
    $parser = $this->parser;
    $stream = $parser->getStream();
    $name = $stream->expect(Token::NAME_TYPE);
    $operator = $stream->expect(Token::OPERATOR_TYPE);
    $value = $parser->getExpressionParser()->parseExpression();
    $stream->expect(Token::BLOCK_END_TYPE);
    $nodeClass = $this->getNodeClass();
    return new $nodeClass($name, $value, $operator, $token->getLine(), $this->getTag());
}