| Total Complexity | 3 |
| Total Lines | 25 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| 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 |
||
| 31 | { |
||
| 32 | $this->countSynchronously = true; |
||
| 33 | } |
||
| 34 | |||
| 35 | protected function prepareTotalCount() |
||
| 38 | } |
||
| 39 | } |
||
| 40 |