change themeClass?

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.

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).

so there’s no way to replace CTheme with my custom one?

‘themeManager’ should be enclosed in ‘components’, while ‘theme’ should be outside of it.

Of course! I knew this is possible, cause why would themeClass be declared as "public"?

Thank you SOOOOO much!!!