Wiki

Sorted by commentsX
Displaying 81-90 of 482 result(s).

Displaying, sorting and filtering HasMany & ManyMany relations in CGridView

Created 9 months ago by yJeroenTutorials8 comments – viewed 17,839 times – ( +11 )
This tutorial gives you multiple options of how to fully implement showing, sorting and filtering related data in gridviews.

How to use a Widget as an Action Provider

Created 2 years ago by Antonio RamirezHow-tos8 comments – viewed 18,969 times – ( +22 )
As written on the API docs: An Action Provider Widget is a widget that has declared several actions by using its 'public static function actions()'. After, a Controller can easily import all its declared actions on its 'public function actions()'.
tags: Widgets, CAction

Understanding "Safe" Validation Rules

Created 2 years ago by Steve FriedlFAQs8 comments – viewed 41,853 times – ( +74 )
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.

An easy way to use escopes and CActiveDataProvider

Created 2 years ago by Rafael GarciaTips8 comments – viewed 14,401 times – ( +1 / -1 )
Often used scopes to define criteria in our models. This is a very useful feature as it ensures that in any part of application applying the criteria defined by the scope when called it.

Using Grunt for deploying client scripts

Created 3 months ago by Chris83How-tos8 comments – viewed 3,795 times – ( +6 )
For a long time I have struggled to find a suitable tool for doing server tasks such as compiling LESS files, concatenating and minifying of JavaScript files and copying the minified JavaScript files. While most of these tasks can be done with Yii extensions I would still not recommend using them because it requires you to include these extensions in your project, and therefore also deploying them in your production environment.

Integrating Wordpress and Yii: yet another approach

Created about a year ago by goncinHow-tos8 comments – viewed 12,069 times – ( +8 / -2 )
It seems many people is trying to make Wordpress and Yii work together. I got stuck with the same problem, but now I think I have achieved doing it, after a lot of hard thinking and many work hours spent.

How to use single form to collect data for two or more models (CActiveForm and Ajax Validation edition)

Created about a year ago by RusAlexHow-tos8 comments – viewed 24,680 times – ( +16 )
With Yii you can use one CActiveForm for collecting data for two or more models with ajax validation and client validation.

Special $variables in CGridView and CListView

Created about a year ago by Steve FriedlTips8 comments – viewed 23,399 times – ( +18 / -1 )
The popular CListView and CGridView widgets each take a data provider and iterate over each data object produced, calling the user's code to render each row one at a time, and most are familiar with the use of the $data variable to represent the current model object or array.

CGridView: Display the full record (actionView) in a CJuiDialog

Created about a year ago by JobloTips7 comments – viewed 22,732 times – ( +13 )
If you show a model (with a lot of attributes) partially in a CGridView, it can be helpful when the user can take a quick look at the full record with all attributes without displaying the view as a page and afterwards returning back to the gridview.

How to automate timestamps in ActiveRecord models

Created 4 years ago by dalipTutorials7 comments – viewed 60,286 times – ( +25 )
There are many ways to automate the setting of timestamps in yii ActiveRecord models. Three are presented here: