コード例 #1
0
 protected function fetchData()
 {
     if (!is_null($this->_cache_duration)) {
         $this->model = $this->model->cache($this->_cache_duration, $this->_cache_dependency, 2);
     }
     return parent::fetchData();
 }
コード例 #2
0
 /**
  * Fetches the data from the persistent data storage.
  * @return array list of data items
  */
 protected function fetchData()
 {
     $data = parent::fetchData();
     foreach ($data as $model) {
         $this->_authorizer->attachUserBehavior($model);
     }
     return $data;
 }
コード例 #3
0
 /**
  * Fetches the data from the persistent data storage.
  * @return array list of data items
  */
 public function fetchData()
 {
     $data = parent::fetchData();
     if ($this->_behaviors !== array()) {
         foreach ($data as $model) {
             $model->attachBehaviors($this->_behaviors);
         }
     }
     return $data;
 }
コード例 #4
0
 /**
  * Fetches the data from the persistent data storage.
  *
  * @return array list of data items
  */
 protected function fetchData()
 {
     $sourceCriteria = clone $this->getCriteria();
     $criteria = $this->getCriteria();
     if (($alphapagination = $this->getAlphaPagination()) !== false) {
         $alphapagination->applyCondition($criteria);
     }
     $result = parent::fetchData();
     $this->setCriteria($sourceCriteria);
     return $result;
 }
コード例 #5
0
 /**
  * Fetches the data from the persistent data storage.
  * Additionally, calls KeenActiveDataProvider::afterFetch method
  * @return array list of data items
  */
 protected function fetchData()
 {
     if ($this->_withKeenLoading) {
         $this->_prepareKeenLoading();
     }
     $data = parent::fetchData();
     if ($data && $this->_withKeenLoading) {
         $data = $this->afterFetch($data);
     }
     return $data;
 }