I am still understanding the basics of Yii and one topic that continues to elude me is the class CDataProvider. Exactly how do I go about using it?
I know that I can use it for pagination, and that by calling new CDataProvider(‘classname’); It will gather all of the objects that belong to classname, but that is about the limit of my knowledge.
Does anyone know of a good guide to explain when to use CDataProvider and how to use it depth? I have tried a significant amount of googling but no avail.
Some examples of things that I would like to look for would be things such as:
-
specify sort order
-
load with another relational item (similar to the with() ) function from CActiveRecord
-
How does it integrate with the CDbCriteria class
-
When to use CDataProvider and when to use another class
Any help would be great, thank you.