Пример #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
 /**
  * Get schema
  * 
  * @return Schema
  */
 public function getSchema()
 {
     if ($this->schema === null) {
         $this->schema = $this->source->getSchema();
     }
     return $this->schema;
 }