Wiki articles tagged with "understanding"

Showing 1-12 of 12 items.

Yii 1.1: Cgridview: Use Special Variable $Data In The Options Of A Button (I.e. Evaluate Options Attribute)

Created 9 years ago by Louis Gac, updated 9 years ago by Louis Gac.

Let's take the example of the above article to display an email button next to a delete button:

3 0
4 followers
Viewed: 22 171 times
Version: 1.1
Category: Tutorials

CGridView: Use special variable $data in the htmlOptions of a column (i.e. evaluate htmlOptions attribute)

Created 12 years ago by c@cba, updated 12 years ago by c@cba.

    For each column of the CGridView, we can specify name, value, htmlOptions, cssClassExpression etc. In the declarations of the attributes value and cssClassExpression we can use the "special" variable $data, for example like this:
'value'=>'$data->author->username',.
    Now we might want to use $data in the declaration of the `...

19 1
14 followers
Viewed: 79 776 times
Version: 1.1
Category: Tutorials

How to learn Yii?!

Created 12 years ago by yJeroen, updated 4 years ago by CeBe.

Here is a step by step To-Do list for Yii beginners. The list is an advice of what tutorials and documentation you can walk through to get a full understanding of the Yii Framework. These can be a help to learn Yii.

17 0
21 followers
Viewed: 118 731 times
Version: all
Category: Tutorials

Understanding series articles

Created 12 years ago by GOsha, updated 12 years ago by GOsha.

Here are all wiki articles from "Understanding" series by Yii wiki contributors:

16 0
12 followers
Viewed: 14 044 times
Version: 1.1
Category: Tips

Understanding Scenarios

Created 12 years ago by Luke Jurgs, updated 11 years ago by Luke Jurgs.

Scenarios are an extremely useful tool for separating validation tasks on any class you use derived from CModel. In this tutorial we will use CActiveRecord.

23 0
39 followers
Viewed: 178 529 times
Version: 1.1
Category: Tutorials

Understanding the view rendering flow

Created 12 years ago by dckurushin, updated 10 years ago by Jorgee.

If we take a look at the blog demo we have 3 major parts of our view rendering. They are:

56 1
55 followers
Viewed: 239 721 times
Version: 1.1
Category: FAQs

Understanding Virtual Attributes and get/set methods

Created 12 years ago by Steve Friedl, updated 12 years ago by GOsha.

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:

class Comment extends CActiveRecord {
    public $helperVariable;
    public function rules() { ... }
    ...
}

and then use them in the obvious way:

$var   = $model->helperVariable;
$rules = $model->rules();

This part everybody understa...

66 0
44 followers
Viewed: 202 283 times
Version: 1.1
Category: Tutorials

Understanding Autoloading, Helper Classes and Helper Functions

Created 13 years ago by Steve Friedl, updated 12 years ago by GOsha.

Many Yii users ask how to create helper classes and functions, and though there are numerous approaches spread out among the forum and wiki articles, this Tutorial tries to bring it all together in one place.

22 0
26 followers
Viewed: 122 301 times
Version: 1.1
Category: Tutorials

Understanding "Safe" Validation Rules

Created 13 years ago by Steve Friedl, updated 11 years ago by Gismo.

A common source of confusion among new Yii users is how the 'safe' validator works, how it works with other validators, and why it's necessary in the first place. This article means to clear up this confusion, as well as explain the notion of Massive Assignment.

75 0
46 followers
Viewed: 181 579 times
Version: 1.1
Category: FAQs

Understanding "Assets"

Created 13 years ago by Steve Friedl, updated 12 years ago by GOsha.

Many newcomers to Yii ask about the assets/ directory found under the webroot, and this article means to explain why it's there and how to work with it.

46 0
40 followers
Viewed: 207 680 times
Version: 1.1
Category: Tutorials

Getting to Understand Hierarchical RBAC Scheme

Created 13 years ago by daemons, updated 9 years ago by rAWTAZ.

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 followers
Viewed: 125 459 times
Version: 1.1
Category: Tutorials

How to work with flash messages

Created 15 years ago by pfth, updated 12 years ago by François Gannaz.

Set your messages in a controller:

Yii::app()->user->setFlash('success', "Data1 saved!");
Yii::app()->user->setFlash('error', "Data2 failed!");
Yii::app()->user->setFlash('notice', "Data3 ignored.");
51 0
40 followers
Viewed: 385 889 times
Version: 1.1
Category: Tutorials