@@ -5,7 +5,7 @@ |
||
| 5 | 5 | use schmunk42\giiant\generators\crud\callbacks\yii\Db; |
| 6 | 6 | use schmunk42\giiant\generators\crud\callbacks\yii\Html; |
| 7 | 7 | |
| 8 | -$aceEditorField = function ($attribute, $model, $generator) { |
|
| 8 | +$aceEditorField = function($attribute, $model, $generator) { |
|
| 9 | 9 | return "\$form->field(\$model, '{$attribute}')->widget(\\trntv\\aceeditor\\AceEditor::className())"; |
| 10 | 10 | }; |
| 11 | 11 | |
@@ -18,8 +18,7 @@ discard block |
||
| 18 | 18 | // Note: For using mounted volumes or shared folders |
| 19 | 19 | 'dirMode' => YII_ENV_PROD ? 0777 : null, |
| 20 | 20 | 'bundles' => getenv('APP_ASSET_USE_BUNDLED') ? |
| 21 | - require(__DIR__.'/assets-gen/prod.php') : |
|
| 22 | - [ |
|
| 21 | + require(__DIR__.'/assets-gen/prod.php') : [ |
|
| 23 | 22 | // Note: if your asset bundle includes bootstrap, you can disable the default asset |
| 24 | 23 | #'yii\bootstrap\BootstrapAsset' => false, |
| 25 | 24 | ], |
@@ -78,7 +77,7 @@ discard block |
||
| 78 | 77 | 'docs/<file:[a-zA-Z0-9_\-\./]+>' => 'docs', |
| 79 | 78 | #'docs' => 'docs/default/index', |
| 80 | 79 | ], |
| 81 | - 'languages' => explode(',',getenv('APP_LANGUAGES')), |
|
| 80 | + 'languages' => explode(',', getenv('APP_LANGUAGES')), |
|
| 82 | 81 | ], |
| 83 | 82 | 'user' => [ |
| 84 | 83 | 'class' => 'app\components\User', |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | ], |
| 29 | 29 | [ |
| 30 | 30 | 'allow' => true, |
| 31 | - 'matchCallback' => function ($rule, $action) { |
|
| 31 | + 'matchCallback' => function($rule, $action) { |
|
| 32 | 32 | return \Yii::$app->user->can( |
| 33 | 33 | $this->module->id.'_'.$this->id.'_'.$action->id, |
| 34 | 34 | ['route' => true] |
@@ -60,8 +60,7 @@ |
||
| 60 | 60 | |
| 61 | 61 | // check for module configuration and assign to favourites |
| 62 | 62 | $moduleConfigItem = (is_object($module)) ? |
| 63 | - (isset($module->params['menuItems']) ? $module->params['menuItems'] : []) : |
|
| 64 | - (isset($module['params']['menuItems']) ? $module['params']['menuItems'] : []); |
|
| 63 | + (isset($module->params['menuItems']) ? $module->params['menuItems'] : []) : (isset($module['params']['menuItems']) ? $module['params']['menuItems'] : []); |
|
| 65 | 64 | switch (true) { |
| 66 | 65 | case !empty($moduleConfigItem): |
| 67 | 66 | $moduleConfigItem = array_merge($defaultItem, $moduleConfigItem); |
@@ -57,7 +57,7 @@ |
||
| 57 | 57 | |
| 58 | 58 | foreach ($flashes as $type => $data) { |
| 59 | 59 | if (isset($this->alertTypes[$type])) { |
| 60 | - $data = (array) $data; |
|
| 60 | + $data = (array)$data; |
|
| 61 | 61 | foreach ($data as $message) { |
| 62 | 62 | /* initialize css class for each alert box */ |
| 63 | 63 | $this->options['class'] = $this->alertTypes[$type].$appendCss; |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | ], |
| 29 | 29 | [ |
| 30 | 30 | 'allow' => true, |
| 31 | - 'matchCallback' => function ($rule, $action) { |
|
| 31 | + 'matchCallback' => function($rule, $action) { |
|
| 32 | 32 | return \Yii::$app->user->can( |
| 33 | 33 | $this->module->id.'_'.$this->id.'_'.$action->id, |
| 34 | 34 | ['route' => true] |
@@ -85,7 +85,7 @@ |
||
| 85 | 85 | |
| 86 | 86 | [ |
| 87 | 87 | 'class' => 'yii\grid\ActionColumn', |
| 88 | - 'urlCreator' => function ($action, $model, $key, $index) { |
|
| 88 | + 'urlCreator' => function($action, $model, $key, $index) { |
|
| 89 | 89 | // using the column name as key, not mapping to 'id' like the standard generator |
| 90 | 90 | $params = is_array($key) ? $key : [$model->primaryKey()[0] => (string)$key]; |
| 91 | 91 | $params[0] = \Yii::$app->controller->id ? \Yii::$app->controller->id.'/'.$action : $action; |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | ], |
| 29 | 29 | [ |
| 30 | 30 | 'allow' => true, |
| 31 | - 'matchCallback' => function ($rule, $action) { |
|
| 31 | + 'matchCallback' => function($rule, $action) { |
|
| 32 | 32 | return \Yii::$app->user->can( |
| 33 | 33 | $this->module->id.'_'.$this->id.'_'.$action->id, |
| 34 | 34 | ['route' => true] |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | ], |
| 29 | 29 | [ |
| 30 | 30 | 'allow' => true, |
| 31 | - 'matchCallback' => function ($rule, $action) { |
|
| 31 | + 'matchCallback' => function($rule, $action) { |
|
| 32 | 32 | return \Yii::$app->user->can( |
| 33 | 33 | $this->module->id.'_'.$this->id.'_'.$action->id, |
| 34 | 34 | ['route' => true] |