示例#1
0
 /**
  * {@inheritdoc}
  */
 public function getTotal()
 {
     if ($this->total === null) {
         $totalRows = $this->dataProvider->getTotal($this->request);
         if ($totalRows === 0) {
             return 0;
         }
         $limit = $this->request->getLimit();
         $this->total = $totalRows > $limit ? (int) ceil($totalRows / $limit) : 1;
     }
     return $this->total;
 }
示例#2
0
文件: Grid.php 项目: mikemirten/zgrid
 /**
  * Get total number of records found by request
  * 
  * @return int
  */
 public function getTotal()
 {
     if ($this->totalRows === null) {
         $this->totalRows = $this->source->getTotal($this->getResolvedRequest());
     }
     return $this->totalRows;
 }