/**
  * cleanupConf
  * 
  * @access protected
  *
  * @return mixed Value.
  */
 protected function cleanupConf()
 {
     $this->fieldsToShow = OJUtil::confArrToHash($this->fieldsToShow);
     $this->fieldsToSearch = OJUtil::confArrToHash($this->fieldsToSearch);
     $this->resultsPerPageArr = OJUtil::arrryToHash($this->resultsPerPageArr);
     foreach ($this->fieldsToShow as $key => &$customizations) {
         $newKey = str_replace('.', '_', $key);
         $this->_fieldNameMapping[$newKey] = $key;
         if ($customizations['wrapper']) {
             if (!is_array($customizations['wrapper'])) {
                 $customizations['wrapper'] = array('name' => $customizations['wrapper']);
             }
         }
     }
     foreach ($this->fieldsToSearch as $fieldName => &$customizations) {
         if (!$customizations['query']) {
             if (!$customizations['type'] || $customizations['type'] == 'text') {
                 $customizations['query'] = "`{$fieldName}` like {{{$fieldName}}}";
             } else {
                 $customizations['query'] = "`{$fieldName}`={{{$fieldName}}}";
             }
         }
     }
 }
예제 #2
0
 public function setFields($fields)
 {
     $this->_requiredFields = OJUtil::confArrToHash($fields);
 }