Wiki

Sorted by commentsX
Displaying 431-440 of 687 result(s).

How to add more information to Yii::app()->user

Created 5 years ago by qiangTutorials1 comment – viewed 112,460 times – ( +25 ) – version 1.1
By default, the expression Yii::app()->user returns a CWebUser application component which represents the information that are closely related with the current user. Some information can be persistent throughout the current user session. For example, CWebUser already comes with a name property that stores the username of the current user.

Q: My yiic tool cannot run model and crud commands. Why?

Created 5 years ago by qiangTutorials1 comment – viewed 6,872 times – version 1.1
Some PHP installations may use a different php.ini file for CLI PHP (command line PHP parser). As a result, when running the model or crud command in yiic shell, you may encounter errors like "YiiBase::include(PDO.php): failed to open stream..." or "...could not find driver", even though the requirement checker confirms you have PDO and the corresponding database driver.

Advanced CTabView using CClipWidget

Created 5 years ago by krillzipTutorials1 comment – viewed 9,991 times – ( +2 ) – version 1.1
Here is a way to dynamically extend tabs based on clips. Probably even more complex things could be done.

Autocomplete in console command

Created 2 years ago by StammTutorials1 comment – viewed 6,872 times – ( +3 ) – version 1.1
Missed of autocomplete in bash console commands yii make me sad.

Customizing the CMenu Widget

Created about a year ago by mistrybTips1 comment – viewed 22,567 times – ( +1 / -1 )
The CMenu class provides some useful features for generating menus in your web application.

AutoTimestampBehavior

Created 5 years ago by jonahTutorials1 comment – viewed 10,318 times – ( +2 / -2 ) – version 1.1
Note: currently a variant of this class CTimestampBehavior is included into Yii distribution package.

Building Page Specific Menus using CMenu

Created about a year ago by mistrybHow-tos1 comment – viewed 6,885 times
The Yii Framework provides a sweet functionality that allows you to easily create page specific menus. What does this mean? This allows you to create one layout or CSS styling for your menu, and when each page is loaded, a new set of menu items is loaded in. This is useful for context specific sidebars within your application.
tags: CMenu

How to validate CSRF token with session

Created 2 years ago by yangmlsHow-tos1 comment – viewed 30,976 times – ( +20 ) – version 1.1
First of all, You must change component config to enable the default Yii CSRF validation.
tags: CSRF, session

Simple authorization system

Created 2 years ago by GustavoHow-tos1 comment – viewed 23,341 times – ( +16 ) – version 1.1
How to create a simple (non-RBAC) authorization system

Display Status image on CGridView column

Created about a year ago by Ankit ModiTutorials1 comment – viewed 6,625 times – ( +1 / -1 ) – version all
How to display status image on admin gridview.