| Total Complexity | 4 |
| Total Lines | 39 |
| Duplicated Lines | 0 % |
| Changes | 3 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | class ActiveDataProvider extends \yii\data\ActiveDataProvider |
||
| 14 | { |
||
| 15 | /** |
||
| 16 | * @var ActiveQuery the query that is used to fetch data models and [[totalCount]] |
||
| 17 | * if it is not explicitly set |
||
| 18 | */ |
||
| 19 | public $query; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * To improve performance, implemented grid summary and pager loading via AJAX when this attribute is `false` |
||
| 23 | * There is a possibility set this attribute via DI |
||
| 24 | * @see \hipanel\base\SearchModelTrait::search() |
||
| 25 | * |
||
| 26 | * @var bool |
||
| 27 | */ |
||
| 28 | public bool $countSynchronously = false; |
||
| 29 | |||
| 30 | public function enableSynchronousCount(): void |
||
| 33 | } |
||
| 34 | |||
| 35 | /** |
||
| 36 | * When receiving the pager and summary through AJAX, to calculate the limit and offset of Grid, |
||
| 37 | * you need to get the maximum possible total count, otherwise the Grid pages will not switch |
||
| 38 | * |
||
| 39 | * @return int |
||
| 40 | * @throws \yii\base\InvalidConfigException |
||
| 41 | */ |
||
| 42 | protected function prepareTotalCount(): int |
||
| 45 | } |
||
| 46 | |||
| 47 | public function refresh(bool $keepTotalCount = false): void |
||
| 54 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.