Abstract Class yii\twig\html\BaseClassNode
| Inheritance | yii\twig\html\BaseClassNode » Twig\Node\Node | 
|---|---|
| Subclasses | yii\twig\html\CssClassNode, yii\twig\html\StyleClassNode | 
| Source Code | https://github.com/yiisoft/yii2-twig/blob/master/src/html/BaseClassNode.php | 
Public Methods
| Method | Description | Defined By | 
|---|---|---|
| compile() | yii\twig\html\BaseClassNode | |
| getHelperMethod() | yii\twig\html\BaseClassNode | 
Method Details
| public void compile ( \Twig\Compiler $compiler ) | ||
| $compiler | ||
                public function compile(Compiler $compiler)
{
    $name = $this->getAttribute('name')->getValue();
    $method = $this->getHelperMethod();
    $compiler
        ->addDebugInfo($this)
        ->write("\yii\helpers\Html::{$method}(\$context[\"{$name}\"],")
        ->subcompile($this->getNode('value'))
        ->raw(");\n");
}