Wiki

Sorted by viewsX
Displaying 31-40 of 786 result(s).

Ajax form submiting in Yii

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

Understanding Scenarios

Created 6 years ago by Luke JurgsTutorials12 comments – viewed 133,357 times – ( +31 / -1 ) – 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.

Behaviors & events

Created 8 years ago by pestaaTutorials10 comments – viewed 131,645 times – ( +52 / -1 ) – 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.

Relations: BELONGS_TO versus HAS_ONE

Created 6 years ago by Steve FriedlFAQs9 comments – viewed 129,722 times – ( +69 / -1 ) – version 1.1
It's very common to see new Yii users confusing the relations HAS_ONE and BELONGS_TO, and getting it wrong means you won't get proper values back. And though we'll talk about HAS_MANY as well, we're specifically omitting the MANY_MANY relation because it's a whole different animal.

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

Created 7 years ago by atrandafirTutorials11 comments – viewed 129,678 times – ( +35 / -1 ) – 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.

Understanding "Safe" Validation Rules

Created 6 years ago by Steve FriedlFAQs11 comments – viewed 125,076 times – ( +95 / -2 ) – 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.

CGridView, CListView and CActiveDataProvider

Created 5 years ago by softarkTutorials22 comments – viewed 122,519 times – ( +46 / -1 ) – 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.

Configuring PhpStorm IDE for Yii

Created 7 years ago by samdarkTips20 comments – viewed 120,671 times – ( +66 / -2 ) – version 1.1
In order to be able to get from render or renderPartial to the view, from widget to widget class, from relations to model classes you need to install additional plugin called YiiStorm.
tags: IDE, PhpStorm

Save and Display Date/Time Fields in different formats in Yii2

Created 3 years ago by Kartik VHow-tos12 comments – viewed 117,820 times – ( +41 / -1 ) – version 2.0
You would find having such a need in most Yii Projects. Your database needs a specific format to store date fields, while you may want to display it in different formats to the users on forms and other views.

Accessing data in a join table with the related models

Created 5 years ago by fsbHow-tos8 comments – viewed 115,023 times – ( +28 / -2 ) – version 1.1
Sometimes the right place to store application data is in a join table. For example, movie viewers either like or don’t like the movies they watched.