Wiki

Articles in category "tutorials", sorted by viewsX
Displaying 11-20 of 247 result(s).

How to add more information to Yii::app()->user

Created 6 years ago by qiangTutorials2 comments – viewed 150,590 times – ( +31 ) – version 1.1
By default, the expression Yii::app()->user returns a CWebUser application component which represents the information that are closely related with the current user. Some information can be persistent throughout the current user session. For example, CWebUser already comes with a name property that stores the username of the current user.

Understanding "Assets"

Created 4 years ago by Steve FriedlTutorials12 comments – viewed 142,049 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.

How to automate timestamps in ActiveRecord models

Created 6 years ago by dalipTutorials9 comments – viewed 132,655 times – ( +31 ) – version 1.1
There are many ways to automate the setting of timestamps in yii ActiveRecord models. Three are presented here:

Understanding Virtual Attributes and get/set methods

Created 4 years ago by Steve FriedlTutorials19 comments – viewed 123,476 times – ( +78 / -1 ) – 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:

Add information to Yii::app()->user by extending CWebUser

Created 6 years ago by atrandafirTutorials11 comments – viewed 117,697 times – ( +35 ) – version 1.1
This little tutorial explains a way how you can retrieve more parameters from Yii::app()->user by adding a component that extends CWebUser and retrieves the user information from database table named User.

Behaviors & events

Created 6 years ago by pestaaTutorials10 comments – viewed 115,271 times – ( +51 ) – version 1.1
These features provide endless possibilities and unbelievable flexibility, but as current documentation does not give more than a few examples, it might be difficult to fully understand their internals and requirements.

Ajax form submiting in Yii

Created 3 years ago by sirin kTutorials8 comments – viewed 114,466 times – ( +13 / -5 ) – version 1.1
hi guys, Here I'm going to give you a working example of ajax form submiting in Yii.

Understanding Scenarios

Created 4 years ago by Luke JurgsTutorials12 comments – viewed 106,619 times – ( +30 ) – 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.

CGridView, CListView and CActiveDataProvider

Created 3 years ago by softarkTutorials22 comments – viewed 105,709 times – ( +46 ) – version 1.1
CGridView (or CListView) together with CActiveDataProvider is a very powerful combination of the built-in tools of Yii. But how do they work together to accomplish their fantastic functions? And what are you expected to do to use them and to customize their behaviors? This article explains the very basics of them.

CJuiDialog and AjaxSubmitButton

Created 5 years ago by tydeas_drTutorials22 comments – viewed 96,951 times – ( +37 / -2 ) – version 1.1
Hello ppl. Even though i have a small experience with yii I though of writing this to help people which want to do something similar.
tags: AJAX