1 | <?php |
||
3 | class ThemeSettings extends CiiSettingsModel |
||
|
|||
4 | { |
||
5 | /** |
||
6 | * The active theme |
||
7 | * @var string |
||
8 | */ |
||
9 | public $theme = 'default'; |
||
10 | |||
11 | /** |
||
12 | * Validation rules for the theme |
||
13 | * @return array |
||
14 | */ |
||
15 | public function rules() |
||
22 | |||
23 | /** |
||
24 | * Attribute labels for themes |
||
25 | * @return array |
||
26 | */ |
||
27 | public function attributeLabels() |
||
33 | |||
34 | /** |
||
35 | * Returns the active theme name |
||
36 | * @return string |
||
37 | */ |
||
38 | public function getTheme() |
||
42 | |||
43 | /** |
||
44 | * Retrieves all of the themes from webroot.themes and returns them in an array group by type, each containing |
||
45 | * the contents of theme.json. |
||
46 | * |
||
47 | * The themes are then cached for easy retrieval later. (I really hate unecessary DiskIO if something isn't changing...) |
||
48 | * |
||
49 | * @return array |
||
50 | */ |
||
51 | public function getThemes() |
||
93 | } |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.