@@ -36,7 +36,7 @@ |
||
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | /** |
| 39 | - * @param $m |
|
| 39 | + * @param string $m |
|
| 40 | 40 | * @return string |
| 41 | 41 | */ |
| 42 | 42 | protected function translate($m): string |
@@ -105,6 +105,9 @@ |
||
| 105 | 105 | return $columns; |
| 106 | 106 | } |
| 107 | 107 | |
| 108 | + /** |
|
| 109 | + * @param string $name |
|
| 110 | + */ |
|
| 108 | 111 | public function getBooleanColumn($name) { |
| 109 | 112 | return [ |
| 110 | 113 | 'class' => BooleanColumn::class, |
@@ -146,7 +146,7 @@ |
||
| 146 | 146 | 'actions' => [ |
| 147 | 147 | 'class' => ActionColumn::className(), |
| 148 | 148 | 'buttons' => [ |
| 149 | - 'view' => function () {}, |
|
| 149 | + 'view' => function() {}, |
|
| 150 | 150 | ], |
| 151 | 151 | ], |
| 152 | 152 | ]; |
@@ -33,6 +33,9 @@ |
||
| 33 | 33 | return '/' . implode('/', $parts); |
| 34 | 34 | } |
| 35 | 35 | |
| 36 | + /** |
|
| 37 | + * @param \execut\actions\Action $action |
|
| 38 | + */ |
|
| 36 | 39 | public static function createFromAction($action, $helper = null) { |
| 37 | 40 | $controller = $action->controller; |
| 38 | 41 | if ($helper === null) { |
@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | $editFormLabel = $this->getEditFormLabel($this->model); |
| 150 | 150 | } |
| 151 | 151 | |
| 152 | - $editFormLabel = strtr($this->labelTemplate, [ |
|
| 152 | + $editFormLabel = strtr($this->labelTemplate, [ |
|
| 153 | 153 | '{label}' => $editFormLabel, |
| 154 | 154 | '{closeButton}' => $this->closeButton, |
| 155 | 155 | ]); |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | } |
| 159 | 159 | |
| 160 | 160 | protected function getCreateFormLabel() { |
| 161 | - $m = $this->createFormLabel; |
|
| 161 | + $m = $this->createFormLabel; |
|
| 162 | 162 | |
| 163 | 163 | $t = $this->translate($m); |
| 164 | 164 | |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | /** |
| 39 | - * @param $m |
|
| 39 | + * @param string $m |
|
| 40 | 40 | * @return string |
| 41 | 41 | */ |
| 42 | 42 | protected function translate($m): string |
@@ -265,7 +265,7 @@ |
||
| 265 | 265 | 'displayOnly' => false, |
| 266 | 266 | 'type' => DetailView::INPUT_WIDGET, |
| 267 | 267 | 'attribute' => 'id', |
| 268 | - 'value' => function () use ($modelsNames) { |
|
| 268 | + 'value' => function() use ($modelsNames) { |
|
| 269 | 269 | return implode(', ', $modelsNames); |
| 270 | 270 | }, |
| 271 | 271 | 'widgetOptions' => [ |
@@ -270,7 +270,7 @@ |
||
| 270 | 270 | // '{create}' => ['class' => 'col-xs-8 text-right'], |
| 271 | 271 | ], |
| 272 | 272 | 'bulkActionsItems' => [ |
| 273 | - 'General' => ['mass-update' => 'Mass edit',], |
|
| 273 | + 'General' => ['mass-update' => 'Mass edit', ], |
|
| 274 | 274 | ], |
| 275 | 275 | 'bulkActionsOptions' => [ |
| 276 | 276 | 'options' => [ |
@@ -181,6 +181,9 @@ |
||
| 181 | 181 | return $first . mb_substr($string, 1, null, $encoding); |
| 182 | 182 | } |
| 183 | 183 | |
| 184 | + /** |
|
| 185 | + * @return string |
|
| 186 | + */ |
|
| 184 | 187 | public function getUniqueId() { |
| 185 | 188 | if ($this->uniqueId) { |
| 186 | 189 | return $this->uniqueId; |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | public function init() |
| 33 | 33 | { |
| 34 | 34 | $this->toolbar = $this->getToolbarConfig(); |
| 35 | - $rowOptions = function ($row) { |
|
| 35 | + $rowOptions = function($row) { |
|
| 36 | 36 | return [ |
| 37 | 37 | 'class' => 'link-row', |
| 38 | 38 | 'data-id' => $row->primaryKey, |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | |
| 43 | 43 | if (is_callable($this->rowOptions)) { |
| 44 | 44 | $oldRowOptions = $this->rowOptions; |
| 45 | - $this->rowOptions = function ($row) use ($oldRowOptions, $rowOptions) { |
|
| 45 | + $this->rowOptions = function($row) use ($oldRowOptions, $rowOptions) { |
|
| 46 | 46 | $oldData = $oldRowOptions($row); |
| 47 | 47 | if ($oldData === null) { |
| 48 | 48 | $oldData = []; |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | }; |
| 53 | 53 | } else if (is_array($this->rowOptions)) { |
| 54 | 54 | $oldRowOptions = $this->rowOptions; |
| 55 | - $this->rowOptions = function ($row) use ($oldRowOptions, $rowOptions) { |
|
| 55 | + $this->rowOptions = function($row) use ($oldRowOptions, $rowOptions) { |
|
| 56 | 56 | return ArrayHelper::merge($rowOptions($row), $oldRowOptions); |
| 57 | 57 | }; |
| 58 | 58 | } else { |
@@ -43,7 +43,7 @@ |
||
| 43 | 43 | 'class' => GridView::class, |
| 44 | 44 | 'responsive' => false, |
| 45 | 45 | 'responsiveWrap' => false, |
| 46 | - 'rowOptions' => function ($row) { |
|
| 46 | + 'rowOptions' => function($row) { |
|
| 47 | 47 | if ($row instanceof DynaGridRow) { |
| 48 | 48 | return $row->getRowOptions(); |
| 49 | 49 | } |