示例#1
0
 /**
  * Fetches the data from the persistent data storage.
  * @return array list of data items
  */
 protected function fetchData()
 {
     $data = parent::fetchData();
     if (empty($data)) {
         $data = $this->rawData;
     }
     return $data;
 }
 /**
  * Fetches the data from the persistent data storage.
  *
  * @return array list of data items
  */
 protected function fetchData()
 {
     if (($alphapagination = $this->getAlphaPagination()) !== false) {
         if ($alphapagination->attribute != '') {
             $alphapagination->resetPaginationVar();
             $currentPage = $alphapagination->getCurrentPage();
             $search = $alphapagination->getDbChar($currentPage - 1);
             if ($currentPage >= 0) {
                 $this->alphaFilterData($currentPage === 0 ? 0 : $search, $alphapagination->attribute, $alphapagination->forceCaseInsensitive);
             }
         } else {
             throw new CException(Yii::t('ApPagination.alphapager', 'There is no value set for "attribute". You must set the model attribute the pagination condition should be applied to.'));
         }
     }
     return parent::fetchData();
 }