@@ -34,10 +34,10 @@ discard block |
||
34 | 34 | parent::init(); |
35 | 35 | ActionColumnAsset::register(Yii::$app->view); |
36 | 36 | |
37 | - if(!$this->controller && !$this->action){ |
|
37 | + if (!$this->controller && !$this->action) { |
|
38 | 38 | $this->action = "{action}"; |
39 | 39 | } |
40 | - else if ($this->controller && !$this->action){ |
|
40 | + else if ($this->controller && !$this->action) { |
|
41 | 41 | $this->action = "{controller}/{action}"; |
42 | 42 | } |
43 | 43 | else if (!$this->controller && $this->action) { |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | protected function initDefaultButton($name, $iconName, $additionalOptions = []) |
63 | 63 | { |
64 | 64 | if (!isset($this->buttons[$name]) && strpos($this->template, '{' . $name . '}') !== false) { |
65 | - $this->buttons[$name] = function ($url, $model, $key) use ($name, $iconName, $additionalOptions) { |
|
65 | + $this->buttons[$name] = function($url, $model, $key) use ($name, $iconName, $additionalOptions) { |
|
66 | 66 | switch ($name) { |
67 | 67 | case 'go': |
68 | 68 | $title = Yii::t('yii', 'Redirect'); |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | } |
107 | 107 | |
108 | 108 | $params = is_array($key) ? $key : ['id' => (string) $key]; |
109 | - $params = array_merge($params, is_array($this->action)? $this->action: [0 => $this->action]); |
|
109 | + $params = array_merge($params, is_array($this->action) ? $this->action : [0 => $this->action]); |
|
110 | 110 | $params[0] = strtr($params[0], [ |
111 | 111 | '{controller}' => $this->controller, |
112 | 112 | '{action}' => $action |
@@ -36,11 +36,9 @@ |
||
36 | 36 | |
37 | 37 | if(!$this->controller && !$this->action){ |
38 | 38 | $this->action = "{action}"; |
39 | - } |
|
40 | - else if ($this->controller && !$this->action){ |
|
39 | + } else if ($this->controller && !$this->action){ |
|
41 | 40 | $this->action = "{controller}/{action}"; |
42 | - } |
|
43 | - else if (!$this->controller && $this->action) { |
|
41 | + } else if (!$this->controller && $this->action) { |
|
44 | 42 | $this->controller = Yii::$app->controller->id; |
45 | 43 | } |
46 | 44 | } |