Showing 521-540 of 652 items.

Getting to Understand Hierarchical RBAC Scheme

Created 15 years ago by daemons daemons, updated 11 years ago by rAWTAZ rAWTAZ. 15 comments

Authentication and Authorization is a good tutorial. Among other topics, it describes basic aspects of Yii's RBAC implementation. But however hard I read the tutorial, I couldn't understand how exactly the hierarchy works. I found how to define authorization hierarchy, how business rules are evaluated, how to configure a...

47 0
56
Viewed: 136 432 times
Version: 1.1
Category: Tutorials

embed a view file of the class which implement the CAction.

Created 15 years ago by Davidhhuan Davidhhuan, updated 15 years ago by Davidhhuan Davidhhuan. 1 comment

In Yii, we can define an action class and ask the controller to instantiate it. And we always create ourselves actions class in rootPath/protected/extensions, and the view file we called in the actions class always are located in rootPath/protected/views/ControllerNAME or rootPath/themes/ThemeNAME/ControllerNAME, then when we use the same actions class in different controllers, we have to copy it...

1 1
2
Viewed: 29 297 times
Version: 1.1
Category: Tutorials

Setting and getting systemwide static parameters

Created 15 years ago by Steve Friedl Steve Friedl, updated 15 years ago by Steve Friedl Steve Friedl. 3 comments

Occasionally one wishes to set systemwide parameters for an application, such as a contact address for email, an application name, or setting an option that guides major behavior. Yii provides for setting of static parameters in the configuration file, and this article talks about how to do it conveniently.

11 0
12
Viewed: 153 269 times
Version: 1.1
Category: How-tos

Putting Function To Be Called In View

Created 15 years ago by junxiong junxiong, updated 15 years ago by junxiong junxiong. 2 comments

Sometimes we need some complicated view to be displayed (such as generating complicated table). Most people suggest that in MVC the View must be as simple as possible (don't have too much loops, etc). So what we have to do is to hide away the complex code by putting it at somewhere else. The following are few places options to keep the function:

5 1
5
Viewed: 55 427 times
Version: 1.1
Category: Tips

Auto TDD - How to auto-run PHPUnit

Created 15 years ago by imehesz imehesz, updated 15 years ago by imehesz imehesz. 3 comments

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!

3 0
6
Viewed: 23 073 times
Version: 1.1
Category: Tips

Multiple-database support in Yii

Created 15 years ago by Steve Friedl Steve Friedl, updated 14 years ago by phazei phazei. 18 comments

The customary configuration of a Yii application includes just a single database section in the protected/config/main.php file, but it's easy to extend this to support more than one, tying each Model to one of the databases.

20 0
39
Viewed: 155 013 times
Version: 1.1
Category: How-tos