_columns4ExportCsv) { $this->_columns4ExportCsv = array('added' => 'Submitted'); $fields = array_keys(Qs_Array::excludeKey($this->_getDataObj()->getTableMeta(), 'id', 'added', 'changed')); unset($fields[array_search('idReason', $fields)]); foreach ($fields as $field) { $this->_columns4ExportCsv[$field] = ucfirst(preg_replace('/([a-z])([A-Z])/', '$1 $2', $field)); } if ($this->getConfig('contactReasonEnabled', true)) { Qs_Array::insertAfterAssoc( $this->_columns4ExportCsv, 'phone', 'reasonTitle', 'Reason for Contact' ); } $this->_columns4ExportCsv['email'] = 'Email Address'; $this->_columns4ExportCsv['phone'] = 'Phone Number'; } return $this->_columns4ExportCsv; } protected function _getListOptions() { $options = parent::_getListOptions(); $options['hasReason'] = $this->getConfig('contactReasonEnabled', false); return $options; } protected function _getFilterFields() { if (null === $this->_filterFields) { parent::_getFilterFields(); if ($this->_getDataObj()->hasReason()) { Qs_Array::insertAfterAssoc($this->_filterFields, 'phone', 'reason', 'Reason for Contact'); } $this->_filterFields['email'] = 'Email Address'; $this->_filterFields['phone'] = 'Phone Number'; } return $this->_filterFields; } }