vassy
(Yevreinov)
1
Hello.
Either I’m missing something or you can’t change themeClass property of CThemeManager using config.
I’ve tried this:
‘components’=>array(
…
‘theme’=>array(‘name’=>‘classic’,‘themeClass’=>‘MTheme’),
-> errors;
and this:
…
‘themeManager’=>array(‘themeClass’=>‘MTheme’)
it says: Property "CWebApplication.themeManager" is read only
Please help.
Thank you.
Onman
(O Rijkers)
2
In Yii properties and attributes are read and set using getter and setter methods, i.e. the property ‘name’ has methods:
public function getName() {…}
public function setName($value) {…}
Some properties are meant to be read only. In that case it has only a getter methods, which is the case with ‘themeClass’.
As your example stated, it can only be read using $xxx->getThemeClass() (or its alternative $xxx->themeClass).
vassy
(Yevreinov)
3
so there’s no way to replace CTheme with my custom one?
qiang
(Qiang Xue)
4
‘themeManager’ should be enclosed in ‘components’, while ‘theme’ should be outside of it.
vassy
(Yevreinov)
5
Of course! I knew this is possible, cause why would themeClass be declared as "public"?
Thank you SOOOOO much!!!