Wiki

Articles tagged with "cactivedataprovider", sorted by date (updated)X
Displaying 1-5 of 5 result(s).

multiple CActiveDataProviders in one CGridView

Updated about a year ago by NashiHow-tos7 comments – viewed 19,702 times – ( +8 / -1 ) – version 1.1
There is a few cases that you want more of one CActiveDataProvider displayed in one CGrideView How to do that?

1:n relations sometimes require CDbCriteria.together

Updated 2 years ago by fsbTips5 comments – viewed 35,756 times – ( +16 ) – version 1.1
There are situations in which Active Record will generate nonsense queries from what a nieve Yii user might think is reasonable code. One such situation is a CActiveDataProvider using CDbCriteria to get data from parent and 1:n child table with a condition on the child table.

CGridView, CListView and CActiveDataProvider

Updated 3 years ago by softarkTutorials22 comments – viewed 112,230 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.

Using cache in CActiveDataProvider

Updated 4 years ago by StammTips7 comments – viewed 19,618 times – ( +21 ) – version 1.1
First param in CActiveDataProvider could be a string with model name or instance of class. So, you may use CActiveRecord::cache() for cache, but you need set third param to 2, because you should cache 2 queries: counting and get data.

An easy way to use escopes and CActiveDataProvider

Updated 5 years ago by Rafael GarciaTips8 comments – viewed 27,450 times – ( +1 / -1 ) – version 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.