Conditions | 2 |
Paths | 2 |
Total Lines | 6 |
Code Lines | 3 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
55 | protected function prepareTotalCount() |
||
56 | { |
||
57 | if (!$this->query instanceof QueryInterface) { |
||
|
|||
58 | throw new InvalidConfigException('The "query" property must be an instance of a class that implements the QueryInterface e.g. yii\db\Query or its subclasses.'); |
||
59 | } |
||
60 | return (int) $this->query->limit($this->getPagination()->getLimit())->offset(-1)->orderBy([])->count('*', $this->db); |
||
61 | } |
||
64 |