1 | <?php |
||
33 | class ThemeManager extends \hiqdev\yii2\collection\Manager implements \yii\base\BootstrapInterface |
||
34 | { |
||
35 | /** |
||
36 | * {@inheritdoc} |
||
37 | */ |
||
38 | protected $_itemClass = Theme::class; |
||
39 | |||
40 | /** |
||
41 | * @var array additional dirs to look for views. |
||
42 | */ |
||
43 | public $pathDirs = []; |
||
44 | |||
45 | /** |
||
46 | * @var string default theme name |
||
47 | */ |
||
48 | protected $_defaultTheme; |
||
49 | |||
50 | /** |
||
51 | * Sets the default theme name. |
||
52 | * |
||
53 | * @param string $theme default theme name. |
||
54 | */ |
||
55 | public function setDefaultTheme($theme) |
||
59 | |||
60 | /** |
||
61 | * Returns the default theme. Returns the first of available themes by default. |
||
62 | * |
||
63 | * @return string default theme name. |
||
64 | */ |
||
65 | public function getDefaultTheme() |
||
74 | |||
75 | protected $_view; |
||
76 | |||
77 | /** |
||
78 | * Returns the view object that can be used to render views or view files. |
||
79 | * The [[render()]] and [[renderFile()]] methods will use |
||
80 | * this view object to implement the actual view rendering. |
||
81 | * If not set, it will default to the "view" application component. |
||
82 | * |
||
83 | * @return \yii\web\View the view object that can be used to render views or view files. |
||
84 | */ |
||
85 | public function getView() |
||
93 | |||
94 | /** |
||
95 | * Sets the view object to be used. |
||
96 | * |
||
97 | * @param View $view the view object that can be used to render views or view files. |
||
98 | */ |
||
99 | public function setView($view) |
||
103 | |||
104 | /** |
||
105 | * @var Theme current theme object |
||
106 | */ |
||
107 | protected $_theme; |
||
108 | |||
109 | /** |
||
110 | * Changes theme. |
||
111 | * @param string theme name |
||
112 | * @throws InvalidConfigException |
||
113 | */ |
||
114 | public function setTheme($name) |
||
121 | |||
122 | public function getTheme() |
||
134 | |||
135 | public function getSettings() |
||
139 | |||
140 | /** |
||
141 | * @return bool |
||
142 | */ |
||
143 | public static function isHomePage() |
||
149 | |||
150 | /** |
||
151 | * @var array assets of the application |
||
152 | */ |
||
153 | public $assets = []; |
||
154 | |||
155 | /** |
||
156 | * Register all the assets. |
||
157 | */ |
||
158 | public function registerAssets() |
||
167 | |||
168 | /** |
||
169 | * @var bool is already bootstrapped. |
||
170 | */ |
||
171 | protected $_isBootstrapped = false; |
||
172 | |||
173 | /** |
||
174 | * {@inheritdoc} |
||
175 | */ |
||
176 | public function bootstrap($app) |
||
192 | |||
193 | /* public function init() |
||
194 | { |
||
195 | parent::init(); |
||
196 | } */ |
||
197 | |||
198 | public $widgets = []; |
||
199 | |||
200 | /** |
||
201 | * Draws widget. |
||
202 | * @param mixed $config |
||
203 | * @throws InvalidConfigException |
||
204 | * @return void |
||
205 | */ |
||
206 | public function widget($config) |
||
233 | |||
234 | /** |
||
235 | * Checks if widget with given name is defined. |
||
236 | * @param mixed $name name or class |
||
237 | * @return boolean |
||
238 | */ |
||
239 | public function hasWidget($name) |
||
243 | } |
||
244 |
Since your code implements the magic getter
_get
, this function will be called for any read access on an undefined variable. You can add the@property
annotation to your class or interface to document the existence of this variable.If the property has read access only, you can use the @property-read annotation instead.
Of course, you may also just have mistyped another name, in which case you should fix the error.
See also the PhpDoc documentation for @property.