Wiki

Sorted by viewsX
Displaying 351-360 of 719 result(s).

Customizing Yii's formatting rules (extending CFormatter)

Created 3 years ago by HaenselTips0 comments – viewed 13,528 times – ( +14 ) – version 1.1
CFormatter is one of Yii's core components and used to format values displayed in widgets like CGridView or CDetailView. All classic formats like numbers, text, urls or datetime are supported but you may have to use a formatting rule that isn't built in. Let's say we want to display arrays of strings (like tags associated with a product model). When using CDetailView we would usually make use of PHPs implode function to create a simple string value of all values in the $product->tags array.

How to call a default layout for every module and how to work <php echo $content; ?>

Created about a year ago by Ankit ModiTips0 comments – viewed 13,484 times – ( -2 )
Hi Friends, Hi Friends, Some common question is difficult to how to create the layout on yii and how to work

ACL and RBAC

Created 2 years ago by zeroByteHow-tos0 comments – viewed 13,484 times – version 1.1
This HowTo assumes that you have a smattering of ACL in general and of how the acl-extension works basically. It will introduce you into the abstract and give you a hint on how to use Business-Rules. If you have in-depth questions, please refer to the extension documentation. Using ACL in an RBAC-manner cannot and should never obscure the fact that the underlying system is still ACL-based. In fact, the Business-Rules are just another layer in the permission-check plan.

A simple action for XUpload extension

Created 3 years ago by tydeas_drTips1 comment – viewed 13,300 times – ( +3 ) – version 1.1
All the basic functionality for an action used by the xupload extension. Check resources for the source code of this action
tags: tips, xupload, caction

A simple class to use a different db for a module

Created 3 years ago by tydeas_drTips2 comments – viewed 13,278 times – ( +9 ) – version 1.1
What would you do if you want/need to have a different than the main database connection in an module's models?

Impersonate Users within Yii Framework

Created 3 years ago by WoilTutorials5 comments – viewed 13,074 times – ( +22 ) – version 1.1
For some applications it can be advantageous for administration reasons to allow site administrators to login as other users. This is sometimes called user impersonation or "becoming that user".

defaultScope

Created about a year ago by Gerhard LiebenbergHow-tos4 comments – viewed 12,981 times – ( +5 / -1 ) – version 1.1
This example includes a composite condition as well as an empty condition - as if you bypass or disable defaultScope without using resetScope().

Auto TDD - How to auto-run PHPUnit

Created 4 years ago by imeheszTips3 comments – viewed 12,956 times – ( +3 / -1 ) – version 1.1
If you are lucky enough and have the privilege to develop on a Linux based environment, this little tip might boost-up your TDD process (at least the Unit Testing part). Please note, that this should work just fine with Apple computers also, but not tested!
tags: PHPUnit, testing, TDD

multiple CActiveDataProviders in one CGridView

Created about a year ago by KonApazHow-tos6 comments – viewed 12,799 times – ( +7 / -1 ) – version 1.1
There is a few cases that you want more of one CActiveDataProvider displayed in one CGrideView How to do that?

How to log context information to logger (session id, user, ...)

Created 5 years ago by olafureTutorials0 comments – viewed 12,791 times – ( +2 ) – version 1.1
Logging context information (session, user, ...) to the logfile can be of great help tracking down problems with specific users.
tags: Logging