Understanding model creation

Hey Guys,

Im wondering if someone could give me some help.

I’m very new to the Yii framework and im taking over some code for a friend.

Would someone be kiind enough to tell me what the following lines do.

$variable = new ModuleModel('search');

$another->columns = $variable->search()->data;

I’ve never seen something passed when creating a new model instance and im not sure what the ‘data’ call does.

Any help would be greatly appreciated.


The constructor accepts a scenario:


"search()" most likely returns a CDataProvider, which has a "data" property: