Wiki

Articles tagged with "understanding", sorted by ratingX
Displaying 1-10 of 12 result(s).

Understanding Virtual Attributes and get/set methods

Created 3 years ago by Steve FriedlTutorials19 comments – viewed 89,751 times – ( +77 ) – 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:

Understanding "Safe" Validation Rules

Created 3 years ago by Steve FriedlFAQs10 comments – viewed 72,678 times – ( +90 / -1 ) – version 1.1
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.

Getting to Understand Hierarchical RBAC Scheme

Created 3 years ago by daemonsTutorials17 comments – viewed 72,573 times – ( +58 ) – 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.

How to work with flash messages

Created 5 years ago by pfthTutorials10 comments – viewed 160,333 times – ( +57 ) – version 1.1
Set your messages in a controller:

Understanding "Assets"

Created 3 years ago by Steve FriedlTutorials11 comments – viewed 112,252 times – ( +57 ) – version 1.1
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.

Understanding the view rendering flow

Created 2 years ago by dckurushinFAQs16 comments – viewed 134,981 times – ( +91 / -3 ) – version 1.1
There is a lot of confusion surrounding what is happening behind the scenes when you render a view.

Understanding Autoloading, Helper Classes and Helper Functions

Created 3 years ago by Steve FriedlTutorials4 comments – viewed 66,742 times – ( +29 ) – version 1.1
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.

Understanding Scenarios

Created 2 years ago by Luke JurgsTutorials11 comments – viewed 77,027 times – ( +27 ) – version 1.1
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.

How to learn Yii?!

Created 2 years ago by yJeroenTutorials9 comments – viewed 63,084 times – ( +19 ) – version 1.1
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.

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

Created 2 years ago by c@cbaTutorials3 comments – viewed 38,274 times – ( +28 / -1 ) – version 1.1
    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 htmlOptions attribute, which is normally not possible, to generate for example the tag <td id="3" class="name_3">, where 3 is the id of the data model for the current row, i.e. $data->id. That is, we want to be able to use: 'htmlOptions'=>array('id'=>'$data->id', 'class'=>'"name_{$data->id}"')     Here's a way to accomplish this...