1 | <?php |
||
20 | class Theme extends \yii\base\Theme implements \hiqdev\yii2\collection\ItemWithNameInterface |
||
21 | { |
||
22 | /** |
||
23 | * @var string theme name |
||
24 | */ |
||
25 | public $name; |
||
26 | |||
27 | /** |
||
28 | * @var string theme label |
||
29 | */ |
||
30 | public $label; |
||
31 | |||
32 | /** |
||
33 | * @var array assets to be registered for this theme |
||
34 | */ |
||
35 | public $assets = []; |
||
36 | |||
37 | private $_manager; |
||
38 | |||
39 | /** |
||
40 | * Returns the manager object that can be used to render views or view files. |
||
41 | * If not set, it will default to the "themeManager" application component. |
||
42 | * |
||
43 | * @return Manager the manager object |
||
44 | */ |
||
45 | public function getManager() |
||
53 | |||
54 | /** |
||
55 | * Sets the manager object to be used by this theme. |
||
56 | * |
||
57 | * @param Manager $manager the manager object. |
||
58 | */ |
||
59 | public function setManager($manager) |
||
63 | |||
64 | private $_view; |
||
65 | |||
66 | /** |
||
67 | * Returns the view object that can be used to render views or view files. |
||
68 | * The [[render()]] and [[renderFile()]] methods will use |
||
69 | * this view object to implement the actual view rendering. |
||
70 | * If not set, it will default to the "view" application component. |
||
71 | * |
||
72 | * @return \yii\web\View the view object that can be used to render views or view files. |
||
73 | */ |
||
74 | public function getView() |
||
82 | |||
83 | /** |
||
84 | * Sets the view object to be used. |
||
85 | * |
||
86 | * @param View $view the view object that can be used to render views or view files. |
||
87 | */ |
||
88 | public function setView($view) |
||
92 | |||
93 | /** |
||
94 | * Getter for pathMap. |
||
95 | */ |
||
96 | public function init() |
||
107 | |||
108 | protected $_viewPath; |
||
109 | protected $_widgetPath; |
||
110 | |||
111 | public function getViewPath() |
||
115 | |||
116 | public function getWidgetPath() |
||
120 | |||
121 | public function calcPathDirs() |
||
141 | |||
142 | public function buildPaths($dirs, $name) |
||
150 | |||
151 | protected $_baseUrl; |
||
152 | |||
153 | /** |
||
154 | * @return string the base URL (without ending slash) for this theme. |
||
155 | * All resources of this theme are considered to be under this base URL. |
||
156 | */ |
||
157 | public function getBaseUrl() |
||
165 | |||
166 | protected $_reflection; |
||
167 | |||
168 | public function getReflection() |
||
176 | |||
177 | private $_settings; |
||
178 | |||
179 | /** |
||
180 | * @param $settings string theme settings model class name |
||
181 | */ |
||
182 | public function setSettings($settings) |
||
186 | |||
187 | public function getSettings() |
||
199 | |||
200 | public static function calcSettingsClass($class) |
||
204 | |||
205 | public static function findSettingsClass($class) |
||
211 | } |
||
212 |
This check marks implicit conversions of arrays to boolean values in a comparison. While in PHP an empty array is considered to be equal (but not identical) to false, this is not always apparent.
Consider making the comparison explicit by using
empty(..)
or! empty(...)
instead.