Conditions | 3 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
22 | public function run() |
||
23 | { |
||
24 | $id = \Yii::$app->request->get($this->primaryKeyParam); |
||
25 | $model = $this->controller->findModel($id, $this->controller->viewClass); |
||
26 | |||
27 | if ($this->updateIfPost && Yii::$app->request->isPost) { |
||
28 | return $this->controller->runAction($this->updateAction, [$this->primaryKeyParam => $id]); |
||
29 | } |
||
30 | return $this->controller->render($this->view, ['model' => $model]); |
||
31 | } |
||
32 | } |