1 | <?php |
||
2 | |||
3 | namespace roaresearch\yii2\roa\actions; |
||
4 | |||
5 | use roaresearch\yii2\roa\hal\ARContract; |
||
6 | use Yii; |
||
7 | |||
8 | class View extends Action |
||
9 | { |
||
10 | /** |
||
11 | * @return ARContract |
||
12 | * @param mixed $id |
||
13 | */ |
||
14 | 2 | public function run($id): ARContract |
|
15 | { |
||
16 | 2 | $this->checkAccess( |
|
17 | 2 | ($model = $this->findModel($id)), |
|
18 | 2 | Yii::$app->getRequest()->getQueryParams() |
|
19 | ); |
||
20 | |||
21 | 2 | return $model; |
|
0 ignored issues
–
show
Bug
Best Practice
introduced
by
![]() |
|||
22 | } |
||
23 | } |
||
24 |