Abstract Class yii\twig\html\BaseClassNode
Inheritance | yii\twig\html\BaseClassNode » Twig_Node |
---|---|
Subclasses | yii\twig\html\CssClassNode, yii\twig\html\StyleClassNode |
Source Code | https://github.com/yiisoft/yii2-twig/blob/master/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(\Twig_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");
}