| 1 | <?php |
||
| 11 | class IndexAction extends Action |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * @var callable a PHP callable that will be called to prepare a data provider that |
||
| 15 | * should return a collection of the models. If not set, [[prepareDataProvider()]] will be used instead. |
||
| 16 | * The signature of the callable should be: |
||
| 17 | * |
||
| 18 | * ```php |
||
| 19 | * function ($action) { |
||
| 20 | * // $action is the action object currently running |
||
| 21 | * } |
||
| 22 | * ``` |
||
| 23 | * |
||
| 24 | * The callable should return an instance of [[ActiveDataProvider]]. |
||
| 25 | */ |
||
| 26 | public $prepareDataProvider; |
||
| 27 | |||
| 28 | |||
| 29 | /** |
||
| 30 | * @return ActiveDataProvider |
||
| 31 | */ |
||
| 32 | public function run() |
||
| 40 | |||
| 41 | /** |
||
| 42 | * Prepares the data provider that should return the requested collection of the models. |
||
| 43 | * @return ActiveDataProvider |
||
| 44 | */ |
||
| 45 | protected function prepareDataProvider() |
||
| 58 | } |