| 1 | <?php |
||
| 7 | trait ModelTrait |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * Find the model based on its primary key value or WHERE condition. |
||
| 11 | * If the model is not found or access denied, a 404 HTTP exception will be thrown. |
||
| 12 | * |
||
| 13 | * @param ActiveRecord $model |
||
| 14 | * @param int|array $id primary key or WHERE condition |
||
| 15 | * @param callable $checkAccess |
||
| 16 | * @return ActiveRecord |
||
| 17 | * @throws NotFoundHttpException |
||
| 18 | */ |
||
| 19 | public function findModel($model, $id, $checkAccess = null) |
||
| 29 | } |
||
| 30 |