protected function filterRow($row)
    {
        $exportRow = array();
        foreach ($row as $columnName => $result) {
            if ($this->model->get($columnName, 'label')) {
                $options = $this->model->get($columnName, $this->modelFilterAttributes);


                foreach ($options as $optionName => $optionValue) {
                    switch ($optionName) {
                        case 'dateFormat':
                            // if there is a formatFunction skip the date formatting
                            if (array_key_exists('formatFunction', $options)) {
                                continue;
                            }

                            $result = $this->filterDateFormat($result, $optionValue, $columnName);

                            break;
                        case 'formatFunction':
                            $result = $this->filterFormatFunction($result, $optionValue);

                            break;
                        case 'itemDisplay':
                            $result = $this->filterItemDisplay($result, $optionValue);

                            break;
                        case 'multiOptions':
                            $result = $this->filterMultiOptions($result, $optionValue);

                            break;
                        default:
                            break;
                    }
                }

                if ($result instanceof \MUtil_Date) {
                    $result = $this->filterDateFormat($result, 'yyyy-MM-dd HH:mm:ss', $columnName);
                }

                $result = $this->filterHtml($result);

                $exportRow[$columnName] = $result;
            }
        }
        return $exportRow;
    }
protected function filterRow($row)
    {
        $exportRow = array();
        foreach ($row as $columnName => $result) {
            if ($this->model->get($columnName, 'label')) {
                $options = $this->model->get($columnName, $this->modelFilterAttributes);


                foreach ($options as $optionName => $optionValue) {
                    switch ($optionName) {
                        case 'dateFormat':
                            // if there is a formatFunction skip the date formatting
                            if (array_key_exists('formatFunction', $options)) {
                                continue;
                            }

                            $result = $this->filterDateFormat($result, $optionValue, $columnName);

                            break;
                        case 'formatFunction':
                            $result = $this->filterFormatFunction($result, $optionValue);

                            break;
                        case 'itemDisplay':
                            $result = $this->filterItemDisplay($result, $optionValue);

                            break;
                        case 'multiOptions':
                            $result = $this->filterMultiOptions($result, $optionValue);

                            break;
                        default:
                            break;
                    }
                }

                if ($result instanceof \MUtil_Date) {
                    $result = $this->filterDateFormat($result, 'yyyy-MM-dd HH:mm:ss', $columnName);
                }

                $result = $this->filterHtml($result);

                $exportRow[$columnName] = $result;
            }
        }
        return $exportRow;
    }
protected function filterRow ( $ row ) { $ exportRow = array ( ) ; foreach ( $ row as $ columnName => $ result ) { if ( $ this -> model -> get ( $ columnName , 'label' ) ) { $ options = $ this -> model -> get ( $ columnName , $ this -> modelFilterAttributes ) ; foreach ( $ options as $ optionName => $ optionValue ) { switch ( $ optionName ) { case 'dateFormat' : // if there is a formatFunction skip the date formatting if ( array_key_exists ( 'formatFunction' , $ options ) ) { continue ; } $ result = $ this -> filterDateFormat ( $ result , $ optionValue , $ columnName ) ; break ; case 'formatFunction' : $ result = $ this -> filterFormatFunction ( $ result , $ optionValue ) ; break ; case 'itemDisplay' : $ result = $ this -> filterItemDisplay ( $ result , $ optionValue ) ; break ; case 'multiOptions' : $ result = $ this -> filterMultiOptions ( $ result , $ optionValue ) ; break ; default : break ; } } if ( $ result instanceof \ MUtil_Date ) { $ result = $ this -> filterDateFormat ( $ result , 'yyyy-MM-dd HH:mm:ss' , $ columnName ) ; } $ result = $ this -> filterHtml ( $ result ) ; $ exportRow [ $ columnName ] = $ result ; } } return $ exportRow ; }
Filter the data in a row so that correct values are being used
@param  array $row a row in the model
@return array The filtered row
Filter the data in a row so that correct values are being used