Changes
Title
unchanged
Using filters with CGridView and CArrayDataProvider
Category
unchanged
How-tos
Yii version
unchanged
Tags
unchanged
CGridview, CArrayDataProvider, filters, filter
Content
changed
[...]
*/
public function filter(array $data)
{
foreach ($data AS $rowIndex => $row) {
foreach ($this->filters AS $key => $searchValue) {
if (!emptyis_null($searchValue)
AND $searchValue !== '') {
$compareValue = null;
if ($row instanceof CModel) {
if (isset($row->$key) == false) {
throw new CException("Property " . get_class($row) . "::{$key} does not exist!");[...]