@@ -115,6 +115,9 @@ |
||
| 115 | 115 | } |
| 116 | 116 | } |
| 117 | 117 | |
| 118 | + /** |
|
| 119 | + * @param string $command |
|
| 120 | + */ |
|
| 118 | 121 | protected function action($command, $params = []) |
| 119 | 122 | { |
| 120 | 123 | echo "\nRunning action '$command'...\n"; |
@@ -1,12 +1,12 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * @link http://www.diemeisterei.de/ |
|
| 4 | - * |
|
| 5 | - * @copyright Copyright (c) 2014 diemeisterei GmbH, Stuttgart |
|
| 6 | - * |
|
| 7 | - * For the full copyright and license information, please view the LICENSE |
|
| 8 | - * file that was distributed with this source code. |
|
| 9 | - */ |
|
| 3 | + * @link http://www.diemeisterei.de/ |
|
| 4 | + * |
|
| 5 | + * @copyright Copyright (c) 2014 diemeisterei GmbH, Stuttgart |
|
| 6 | + * |
|
| 7 | + * For the full copyright and license information, please view the LICENSE |
|
| 8 | + * file that was distributed with this source code. |
|
| 9 | + */ |
|
| 10 | 10 | namespace app\commands; |
| 11 | 11 | |
| 12 | 12 | use dektrium\user\Finder; |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | * @param array $params |
| 26 | 26 | * @param bool|true $allowCaching |
| 27 | 27 | * |
| 28 | - * @return bool |
|
| 28 | + * @return boolean|null |
|
| 29 | 29 | */ |
| 30 | 30 | public function can($permissionName, $params = [], $allowCaching = true) |
| 31 | 31 | { |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | /** |
| 46 | 46 | * Checks permissions from guest role, when no user is logged in. |
| 47 | 47 | * |
| 48 | - * @param $permissionName |
|
| 48 | + * @param string $permissionName |
|
| 49 | 49 | * @param $params |
| 50 | 50 | * @param $allowCaching |
| 51 | 51 | * |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | * Splits `permissionName` by underscore and match parts against more global rule |
| 65 | 65 | * eg. a permission `app_site` will match, `app_site_foo` |
| 66 | 66 | * |
| 67 | - * @param $permissionName |
|
| 67 | + * @param string $permissionName |
|
| 68 | 68 | * @param $params |
| 69 | 69 | * @param $allowCaching |
| 70 | 70 | * |
@@ -2,7 +2,6 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace app\modules\prototype\models\search; |
| 4 | 4 | |
| 5 | -use Yii; |
|
| 6 | 5 | use yii\base\Model; |
| 7 | 6 | use yii\data\ActiveDataProvider; |
| 8 | 7 | use app\modules\prototype\models\Less as LessModel; |
@@ -2,8 +2,6 @@ |
||
| 2 | 2 | |
| 3 | 3 | use app\assets\AppAsset; |
| 4 | 4 | use app\widgets\Alert; |
| 5 | -use yii\bootstrap\Nav; |
|
| 6 | -use yii\bootstrap\NavBar; |
|
| 7 | 5 | use yii\helpers\Html; |
| 8 | 6 | |
| 9 | 7 | /* @var $this \yii\web\View */ |
@@ -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', |
@@ -1,10 +1,10 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * @link http://www.yiiframework.com/ |
|
| 4 | - * |
|
| 5 | - * @copyright Copyright (c) 2008 Yii Software LLC |
|
| 6 | - * @license http://www.yiiframework.com/license/ |
|
| 7 | - */ |
|
| 3 | + * @link http://www.yiiframework.com/ |
|
| 4 | + * |
|
| 5 | + * @copyright Copyright (c) 2008 Yii Software LLC |
|
| 6 | + * @license http://www.yiiframework.com/license/ |
|
| 7 | + */ |
|
| 8 | 8 | namespace app\modules\backend\assets; |
| 9 | 9 | |
| 10 | 10 | use yii\helpers\FileHelper; |
@@ -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); |