Abstract Class yii\twig\html\BaseClassNode
| Inheritance | yii\ |
|---|---|
| Subclasses | yii\ |
| Source Code | https://github.com/yiisoft/yii2-twig/blob/master/html/BaseClassNode.php |
Public Methods
| Method | Description | Defined By |
|---|---|---|
| compile() | yii\ |
|
| getHelperMethod() | yii\ |
Method Details
| public mixed compile ( \ | ||
| $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" );
}