# Class yii\twig\html\CssClass_TokenParser

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

## Public Methods

Hide inherited methods

Method | Description | Defined By
--- | --- | ---
getNodeClass() |  | yii\twig\html\CssClass_TokenParser
getTag() |  | yii\twig\html\CssClass_TokenParser
parse() |  | yii\twig\html\BaseCss_TokenParser

## Method Details

Hide inherited methods

getNodeClass() public method

public void getNodeClass ( )

Source code

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

getTag() public method

public void getTag ( )

Source code

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

parse() public method

Defined in: yii\twig\html\BaseCss_TokenParser::parse()

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

Source code

                    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());
    }