Commit c9635dd9 by Alexander Makarov

Added class example to Twig extension docs

parent bb4073c9
......@@ -132,6 +132,7 @@ helpers and your own variables there:
'globals' => [
'html' => '\yii\helpers\Html',
'name' => 'Carsten',
'GridView' => '\yii\grid\GridView',
],
```
......@@ -139,6 +140,8 @@ Once configured, in your template you can use the globals in the following way:
```
Hello, {{name}}! {{ html.a('Please login', 'site/login') | raw }}.
{{ GridView.widget({'dataProvider' : provider}) | raw }}
```
#### Functions
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment