Yii::app()->theme = 'ThemeName';
The above code can be set anywhere in your Yii Application to change the current Theme.
Yii::app()->theme = 'ThemeName';
The above code can be set anywhere in your Yii Application to change the current Theme.
Use the getAttributeLabel() method (available since v1.1.4)
Code Example:
Products::model()->getAttributeLabel('brand_id')
The above example gets the attribute label for the brand_id attribute in the model Products.
This can be done using the registerCss() method of the CClientScript class. CClientScript manages JavaScript and CSS stylesheets for views. registerCss()registers a piece of CSS code. Place code similar to the example code below in your View Yii::app()->clientScript->registerCss('customCSS',<<<CSS li { font-weight: normal; } CSS ); In the code above the first parameter...
To delete all Cookies execute the following command:
Yii::app()->request->cookies->clear();
To delete a specific cookie execute the command below, only replacing cookie_name with the name of your cookie:
unset(Yii::app()->request->cookies['cookie_name']);