Dataprovider?

I am very new to Yii but not new to programming. I am adding extensions to my application and the example code to place in my view is as follows:




$this->widget('ext.JCarousel.JCarousel', array( 

'dataProvider' => $dataProvider,

'thumbUrl' => '"/galleria/thumbs/thumb_".$data->file_name',

'imageUrl' => '"/galleria/".$data->file_name',

'target' => 'big-gallery-item',

));



What is:




'dataProvider' => $dataProvider,

I have run into this a few times now. I am assuming it is database related but have no idea what to do with it, how to set the variable. Once again, very new to Yii and MVC frameworks in general. If someone could explain in very simple terms what it is, how it is set and some general uses, i would be very thankful.

Thanks in advance,

Jason

Welcome to the forum. This post may help.

/Tommy

Thanks that was actually helpful. I supposed I could have found that myself if I knew what I was looking for lol.

Thanks again,

Jason

The only question I still have is why do I need a dataprovider for something that doesn’t really access the database. Can I remove the dataprovider variable without messing up the rest of the code?

I’m not familiar with this extension but there’s some more descriptive text in the source file. You will need a Gallery AR model.




$dataProvider=new CActiveDataProvider('Gallery');



/Tommy