1 | <?php |
||
18 | class View extends \yii\base\View |
||
19 | { |
||
20 | /** |
||
21 | * {@inheritdoc} |
||
22 | */ |
||
23 | public $defaultExtension = 'twig'; |
||
24 | |||
25 | 5 | public function init() |
|
26 | { |
||
27 | 5 | parent::init(); |
|
28 | 5 | $this->theme->pathMap['@app/views'] = array_merge( |
|
29 | 5 | (array) $this->theme->pathMap['@app/views'], |
|
30 | 5 | (array) Yii::$app->get('config')->rawItem('views') |
|
31 | 5 | ); |
|
32 | 5 | } |
|
33 | |||
34 | public function getConfig() |
||
35 | { |
||
36 | return Yii::$app->config; |
||
37 | } |
||
38 | |||
39 | /** |
||
40 | * Returns rendering context. |
||
41 | */ |
||
42 | 5 | public function getContext() |
|
46 | |||
47 | public function existsTemplate($template) |
||
51 | |||
52 | 5 | public function render($template, $data = [], $context = null) |
|
56 | } |
||
57 |