Wiki

Articles in category "tutorials", sorted by ratingX
Displaying 1-10 of 254 result(s).

Searching and sorting by related model in CGridView

Created 5 years ago by Maciej LiżewskiTutorials86 comments – viewed 197,550 times – ( +126 / -1 ) – version 1.1
Lets say we have two models and relation between them:

Yii for beginners

Created 5 years ago by rackyczTutorials13 comments – viewed 304,271 times – ( +99 / -1 ) – version 1.1
Hi. This is first article with my Yii tutorial. I had to split it into more articles as there's limited length of texts on Wiki. So once you understand basics, you can read next article here: Yii for beginners 2.

By Example: CHtml

Created 7 years ago by jonahTutorials15 comments – viewed 845,303 times – ( +117 / -2 ) – version 1.1
"By Example" cookbook pages will provide coding examples for many of the commonly used classes within Yii. We will try to provide as many usage examples as possible for keep these pages as helpful as possible.

NetBeans IDE and Yii projects

Created 6 years ago by marcovtwoutTutorials28 comments – viewed 198,186 times – ( +76 / -1 ) – version 1.1
This page is created to supply short directions and general tips for managing a Yii application in NetBeans IDE.

How to use a single form to collect data for two or more models?

Created 8 years ago by qiangTutorials33 comments – viewed 216,320 times – ( +118 / -3 ) – version 1.1
Assume we want to use a single HTML form to collect input for both model A and model B, and we want to display input errors (if any) in the same error summary box. We can define the following action code:

CJuiDialog to create new model

Created 6 years ago by zaccariaTutorials54 comments – viewed 97,605 times – ( +69 / -1 ) – version 1.1
In this tutorial we will learn how to realize a create interface using a dialog.

Getting to Understand Hierarchical RBAC Scheme

Created 6 years ago by daemonsTutorials15 comments – viewed 99,915 times – ( +63 / -1 ) – version 1.1
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 authManager, but almost nothing about how I should build my hierarchy, in what sequence its nodes are checked, when the checking process stops and what would be the checking result.

Understanding Virtual Attributes and get/set methods

Created 6 years ago by Steve FriedlTutorials20 comments – viewed 146,905 times – ( +80 / -2 ) – version 1.1
When you define or extend a class, you can create class variables and methods in Yii just like you can in any other PHP system:

Creating a dependent dropdown

Created 8 years ago by dalipTutorials53 comments – viewed 330,161 times – ( +112 / -4 ) – version 1.1
Often you'll need a form with two dropdowns, and one dropdown's values will be dependent on the value of the other dropdown. Using Yii's built-in AJAX functionality you can create such a dropdown.

How to work with flash messages

Created 8 years ago by pfthTutorials12 comments – viewed 279,794 times – ( +60 / -1 ) – version 1.1
Set your messages in a controller: