Is it possible to change dataprovider data?
I have two arrays:
I have model based on db table Product.
I need to do something like this:
- Create $where statement based on $array_of_ids.
$dataProvider = new CActiveDataProvider('Product', array( 'criteria' => array( 'scopes' => array( 'active', ), 'condition' => $where )) );
- Product model contains Quantity item that doesn’t come from databse, but from $array_of_quantities.
I need to loop through $dataProvider items and through $array_of_quanties.
For matching IDs I need to change $dataProvider item Quantity to display it in CListView.
How can I do this?