Process models in CActiveDataProvider

I’m using generated by gii CRUD, and on the Admin page I have CGridView which is filled with data. This data is from CActiveDataProvider which is returned by search() action of the model.

I need to check status of some models in this CGridView every minute. Is there a way to run a function for every model returned by CActiveDataProvider before sending them to CGridView?




foreach( $dataProvider->data as $object ) {

   ...

}



above will only process objects from visible page. If you want to process all objects - you have to extract criteria from dataProvider and fetch records on your own.

Thanks, redguy!