@@ -32,8 +32,8 @@ |
||
| 32 | 32 | |
| 33 | 33 | public function actionRootNode() |
| 34 | 34 | { |
| 35 | - $rootNodeQuery = \dmstr\modules\pages\models\Tree::find()->where(['domain_id' => 'root']); |
|
| 35 | + $rootNodeQuery = \dmstr\modules\pages\models\Tree::find()->where([ 'domain_id' => 'root' ]); |
|
| 36 | 36 | $rootNode = $rootNodeQuery->one(); |
| 37 | - return $this->run('/pages/default/page', ['pageId' => $rootNode->id]); |
|
| 37 | + return $this->run('/pages/default/page', [ 'pageId' => $rootNode->id ]); |
|
| 38 | 38 | } |
| 39 | 39 | } |
@@ -31,11 +31,11 @@ discard block |
||
| 31 | 31 | \yii\base\Event::on( |
| 32 | 32 | \yii\web\View::className(), |
| 33 | 33 | \yii\web\View::EVENT_AFTER_RENDER, |
| 34 | - function ($e) { |
|
| 34 | + function($e) { |
|
| 35 | 35 | // disable unbundled asset |
| 36 | - $e->sender->assetBundles['yii\\bootstrap\\BootstrapAsset'] = null; |
|
| 36 | + $e->sender->assetBundles[ 'yii\\bootstrap\\BootstrapAsset' ] = null; |
|
| 37 | 37 | // disable bundled asset |
| 38 | - $e->sender->assetBundles['bootstrap'] = null; |
|
| 38 | + $e->sender->assetBundles[ 'bootstrap' ] = null; |
|
| 39 | 39 | } |
| 40 | 40 | ); |
| 41 | 41 | } |
@@ -43,16 +43,16 @@ discard block |
||
| 43 | 43 | // SEO |
| 44 | 44 | $route = Url::toRoute(Yii::$app->controller->action->uniqueId); |
| 45 | 45 | if ($keywords = \Yii::$app->settings->get($route, 'app.seo.keywords', null)) { |
| 46 | - $this->registerMetaTag(['name' => 'keywords', 'content' => $keywords]); |
|
| 46 | + $this->registerMetaTag([ 'name' => 'keywords', 'content' => $keywords ]); |
|
| 47 | 47 | } |
| 48 | 48 | if ($description = \Yii::$app->settings->get($route, 'app.seo.descriptions', null)) { |
| 49 | - $this->registerMetaTag(['name' => 'description', 'content' => $description]); |
|
| 49 | + $this->registerMetaTag([ 'name' => 'description', 'content' => $description ]); |
|
| 50 | 50 | } |
| 51 | 51 | if ($title = \Yii::$app->settings->get($route, 'app.seo.titles', null)) { |
| 52 | 52 | $this->title = $title; |
| 53 | 53 | } |
| 54 | 54 | if ($favicon = \Yii::$app->settings->get('faviconPng', 'app.assets', null)) { |
| 55 | - $this->registerLinkTag(['rel' => 'shortcut icon', 'type' => 'image/png', 'href' => $favicon]); |
|
| 55 | + $this->registerLinkTag([ 'rel' => 'shortcut icon', 'type' => 'image/png', 'href' => $favicon ]); |
|
| 56 | 56 | } |
| 57 | 57 | |
| 58 | 58 | ?> |
@@ -79,12 +79,12 @@ discard block |
||
| 79 | 79 | 'linkSelector' => '.frontend-reload', |
| 80 | 80 | ]) ?> |
| 81 | 81 | |
| 82 | -<?= TwigWidget::widget(['key' => '_beginBody', 'renderEmpty' => false]) ?> |
|
| 82 | +<?= TwigWidget::widget([ 'key' => '_beginBody', 'renderEmpty' => false ]) ?> |
|
| 83 | 83 | |
| 84 | 84 | <!-- Navbar --> |
| 85 | 85 | <?php |
| 86 | 86 | if (Yii::$app->settings->get('enableTwigNavbar', 'app.layout', false)) { |
| 87 | - echo \dmstr\modules\prototype\widgets\TwigWidget::widget(['key' => '_navbar']); |
|
| 87 | + echo \dmstr\modules\prototype\widgets\TwigWidget::widget([ 'key' => '_navbar' ]); |
|
| 88 | 88 | } else { |
| 89 | 89 | echo $this->render('_navbar'); |
| 90 | 90 | } |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | |
| 101 | 101 | <!-- Footer --> |
| 102 | 102 | <footer class="footer"> |
| 103 | - <?= Cell::widget(['id' => '_footer', 'requestParam' => '_global']) ?> |
|
| 103 | + <?= Cell::widget([ 'id' => '_footer', 'requestParam' => '_global' ]) ?> |
|
| 104 | 104 | </footer> |
| 105 | 105 | |
| 106 | 106 | <!-- Info Modal --> |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | <?= Html::a( |
| 111 | 111 | '<i class="fa fa-heartbeat"></i>', |
| 112 | 112 | '#', |
| 113 | - ['class' => 'text-muted', 'data-toggle' => 'modal', 'data-target' => '#phd-info-modal'] |
|
| 113 | + [ 'class' => 'text-muted', 'data-toggle' => 'modal', 'data-target' => '#phd-info-modal' ] |
|
| 114 | 114 | ) ?> |
| 115 | 115 | </p> |
| 116 | 116 | </div> |
@@ -130,7 +130,7 @@ discard block |
||
| 130 | 130 | ], |
| 131 | 131 | ]) ?> |
| 132 | 132 | |
| 133 | -<?= TwigWidget::widget(['key' => '_endBody', 'renderEmpty' => false]) ?> |
|
| 133 | +<?= TwigWidget::widget([ 'key' => '_endBody', 'renderEmpty' => false ]) ?> |
|
| 134 | 134 | |
| 135 | 135 | <?php if (Yii::$app->user->can('backend_default_index')): ?> |
| 136 | 136 | <?= Toolbar::widget([ |
@@ -11,9 +11,9 @@ discard block |
||
| 11 | 11 | |
| 12 | 12 | // Settings for web-application only |
| 13 | 13 | return [ |
| 14 | - 'on registerMenuItems' => function ($event) { |
|
| 15 | - Yii::$app->params['context.menuItems'] = \yii\helpers\ArrayHelper::merge( |
|
| 16 | - Yii::$app->params['context.menuItems'], |
|
| 14 | + 'on registerMenuItems' => function($event) { |
|
| 15 | + Yii::$app->params[ 'context.menuItems' ] = \yii\helpers\ArrayHelper::merge( |
|
| 16 | + Yii::$app->params[ 'context.menuItems' ], |
|
| 17 | 17 | $event->sender->getMenuItems() |
| 18 | 18 | ); |
| 19 | 19 | $event->handled = true; |
@@ -29,8 +29,8 @@ discard block |
||
| 29 | 29 | 'web' => [ |
| 30 | 30 | 'class' => 'codemix\streamlog\Target', |
| 31 | 31 | 'url' => 'php://stdout', |
| 32 | - 'levels' => ['info', 'trace'], |
|
| 33 | - 'logVars' => [], |
|
| 32 | + 'levels' => [ 'info', 'trace' ], |
|
| 33 | + 'logVars' => [ ], |
|
| 34 | 34 | 'replaceNewline' => YII_DEBUG ? null : '', |
| 35 | 35 | 'enabled' => YII_DEBUG && !YII_ENV_TEST, |
| 36 | 36 | ], |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | 'settings' => [ |
| 51 | 51 | 'class' => 'pheme\settings\Module', |
| 52 | 52 | 'layout' => '@backend/views/layouts/box', |
| 53 | - 'accessRoles' => ['settings-module'], |
|
| 53 | + 'accessRoles' => [ 'settings-module' ], |
|
| 54 | 54 | ], |
| 55 | 55 | ], |
| 56 | 56 | ]; |
@@ -17,10 +17,10 @@ discard block |
||
| 17 | 17 | $languages = explode(',', getenv('APP_LANGUAGES')); |
| 18 | 18 | |
| 19 | 19 | // prepare asset bundle config |
| 20 | -$bundles = []; |
|
| 20 | +$bundles = [ ]; |
|
| 21 | 21 | if (getenv('APP_ASSET_USE_BUNDLED')) { |
| 22 | 22 | // include generated asset-bundle configuration |
| 23 | - $bundles = include Yii::getAlias('@web/bundles') . '/config.php'; |
|
| 23 | + $bundles = include Yii::getAlias('@web/bundles').'/config.php'; |
|
| 24 | 24 | // disable loading of bundles skin file, when using bundled assets |
| 25 | 25 | Yii::$container->set( |
| 26 | 26 | AdminLteAsset::className(), |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | |
| 33 | 33 | // set redis connection |
| 34 | 34 | \Resque::setBackend( |
| 35 | - getenv('REDIS_PORT_6379_TCP_ADDR') . ':' . |
|
| 35 | + getenv('REDIS_PORT_6379_TCP_ADDR').':'. |
|
| 36 | 36 | getenv('REDIS_PORT_6379_TCP_PORT') |
| 37 | 37 | ); |
| 38 | 38 | |
@@ -48,8 +48,8 @@ discard block |
||
| 48 | 48 | return [ |
| 49 | 49 | 'id' => 'app', |
| 50 | 50 | 'name' => getenv('APP_TITLE'), |
| 51 | - 'language' => $languages[0], |
|
| 52 | - 'basePath' => realpath(__DIR__ . '/..'), |
|
| 51 | + 'language' => $languages[ 0 ], |
|
| 52 | + 'basePath' => realpath(__DIR__.'/..'), |
|
| 53 | 53 | 'vendorPath' => '@app/../vendor', |
| 54 | 54 | 'runtimePath' => '@app/../runtime', |
| 55 | 55 | // Bootstrapped modules are loaded in every request |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | ], |
| 66 | 66 | 'params' => [ |
| 67 | 67 | 'adminEmail' => getenv('APP_ADMIN_EMAIL'), |
| 68 | - 'context.menuItems' => [], |
|
| 68 | + 'context.menuItems' => [ ], |
|
| 69 | 69 | 'yii.migrations' => ArrayHelper::merge( |
| 70 | 70 | explode(',', getenv('APP_MIGRATION_LOOKUP')), |
| 71 | 71 | [ |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | '@dmstr/modules/publication/migrations' |
| 82 | 82 | ] |
| 83 | 83 | ), |
| 84 | - 'backend.iframe.name' => 'backend-' . getenv('HOSTNAME'), |
|
| 84 | + 'backend.iframe.name' => 'backend-'.getenv('HOSTNAME'), |
|
| 85 | 85 | ], |
| 86 | 86 | 'components' => [ |
| 87 | 87 | 'assetManager' => [ |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | ], |
| 94 | 94 | 'authManager' => [ |
| 95 | 95 | 'class' => \dektrium\rbac\components\DbManager::class, |
| 96 | - 'defaultRoles' => ['Default'], |
|
| 96 | + 'defaultRoles' => [ 'Default' ], |
|
| 97 | 97 | ], |
| 98 | 98 | 'cache' => getenv('APP_NO_CACHE') ? null : [ |
| 99 | 99 | 'class' => \yii\redis\Cache::class, |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | 'key' => getenv('AMAZON_S3_BUCKET_PUBLIC_KEY'), |
| 117 | 117 | 'secret' => getenv('AMAZON_S3_BUCKET_SECRET_KEY'), |
| 118 | 118 | 'bucket' => getenv('AMAZON_S3_BUCKET_NAME'), |
| 119 | - 'prefix' => getenv('APP_NAME') . '/public', |
|
| 119 | + 'prefix' => getenv('APP_NAME').'/public', |
|
| 120 | 120 | 'region' => getenv('AMAZON_S3_BUCKET_REGION'), |
| 121 | 121 | ], |
| 122 | 122 | 'fsRuntime' => [ |
@@ -141,8 +141,8 @@ discard block |
||
| 141 | 141 | 'common' => [ |
| 142 | 142 | 'class' => \codemix\streamlog\Target::class, |
| 143 | 143 | 'url' => 'php://stderr', |
| 144 | - 'levels' => ['error', 'warning'], |
|
| 145 | - 'logVars' => [], |
|
| 144 | + 'levels' => [ 'error', 'warning' ], |
|
| 145 | + 'logVars' => [ ], |
|
| 146 | 146 | 'replaceNewline' => (APP_TYPE == 'console') ? null : '', |
| 147 | 147 | ], |
| 148 | 148 | ], |
@@ -172,9 +172,9 @@ discard block |
||
| 172 | 172 | 'user' => [ |
| 173 | 173 | 'class' => \dmstr\web\User::class, |
| 174 | 174 | 'enableAutoLogin' => true, |
| 175 | - 'loginUrl' => ['/user/security/login'], |
|
| 175 | + 'loginUrl' => [ '/user/security/login' ], |
|
| 176 | 176 | 'identityClass' => \dektrium\user\models\User::class, |
| 177 | - 'rootUsers' => ['admin'], |
|
| 177 | + 'rootUsers' => [ 'admin' ], |
|
| 178 | 178 | ], |
| 179 | 179 | 'urlManager' => [ |
| 180 | 180 | 'class' => \codemix\localeurls\UrlManager::class, |
@@ -205,20 +205,20 @@ discard block |
||
| 205 | 205 | 'auto_reload' => true, |
| 206 | 206 | ], |
| 207 | 207 | 'globals' => [ |
| 208 | - 'Html' => ['class' => \yii\helpers\Html::class], |
|
| 209 | - 'Json' => ['class' => \yii\helpers\Json::class], |
|
| 210 | - 'Tree' => ['class' => \dmstr\modules\pages\models\Tree::class], |
|
| 211 | - 'FA' => ['class' => \rmrevin\yii\fontawesome\FA::class], |
|
| 212 | - 'FileUrl' => ['class' => \hrzg\filemanager\helpers\Url::class], |
|
| 213 | - 'Url' => ['class' => \yii\helpers\Url::class], |
|
| 208 | + 'Html' => [ 'class' => \yii\helpers\Html::class ], |
|
| 209 | + 'Json' => [ 'class' => \yii\helpers\Json::class ], |
|
| 210 | + 'Tree' => [ 'class' => \dmstr\modules\pages\models\Tree::class ], |
|
| 211 | + 'FA' => [ 'class' => \rmrevin\yii\fontawesome\FA::class ], |
|
| 212 | + 'FileUrl' => [ 'class' => \hrzg\filemanager\helpers\Url::class ], |
|
| 213 | + 'Url' => [ 'class' => \yii\helpers\Url::class ], |
|
| 214 | 214 | ], |
| 215 | 215 | 'functions' => [ |
| 216 | - 'image' => function ($imageSource, $preset = null) { |
|
| 216 | + 'image' => function($imageSource, $preset = null) { |
|
| 217 | 217 | // preset example, when using imageproxy, https://github.com/willnorris/imageproxy#examples |
| 218 | - return Yii::$app->settings->get('imgBaseUrl', 'app.frontend') . |
|
| 219 | - $preset . |
|
| 220 | - Yii::$app->settings->get('imgHostPrefix', 'app.frontend') . |
|
| 221 | - $imageSource . |
|
| 218 | + return Yii::$app->settings->get('imgBaseUrl', 'app.frontend'). |
|
| 219 | + $preset. |
|
| 220 | + Yii::$app->settings->get('imgHostPrefix', 'app.frontend'). |
|
| 221 | + $imageSource. |
|
| 222 | 222 | Yii::$app->settings->get('imgHostSuffix', 'app.frontend'); |
| 223 | 223 | }, |
| 224 | 224 | ], |
@@ -232,7 +232,7 @@ discard block |
||
| 232 | 232 | 'modules' => [ |
| 233 | 233 | 'audit' => [ |
| 234 | 234 | 'class' => \bedezign\yii2\audit\Audit::class, |
| 235 | - 'accessRoles' => ['audit-module'], |
|
| 235 | + 'accessRoles' => [ 'audit-module' ], |
|
| 236 | 236 | 'layout' => '@backend/views/layouts/box', |
| 237 | 237 | 'panels' => [ |
| 238 | 238 | 'audit/request', |
@@ -240,9 +240,9 @@ discard block |
||
| 240 | 240 | 'audit/trail', |
| 241 | 241 | 'audit/javascript', # enable app.assets.registerJSLoggingAsset via settings |
| 242 | 242 | // These provide special functionality and get loaded to activate it |
| 243 | - 'audit/error', // Links the extra error reporting functions (`exception()` and `errorMessage()`) |
|
| 244 | - 'audit/extra', // Links the data functions (`data()`) |
|
| 245 | - 'audit/curl', // Links the curl tracking function (`curlBegin()`, `curlEnd()` and `curlExec()`) |
|
| 243 | + 'audit/error', // Links the extra error reporting functions (`exception()` and `errorMessage()`) |
|
| 244 | + 'audit/extra', // Links the data functions (`data()`) |
|
| 245 | + 'audit/curl', // Links the curl tracking function (`curlBegin()`, `curlEnd()` and `curlExec()`) |
|
| 246 | 246 | //'audit/db', |
| 247 | 247 | //'audit/log', |
| 248 | 248 | //'audit/profiling', |
@@ -310,15 +310,15 @@ discard block |
||
| 310 | 310 | 'class' => \lajax\translatemanager\Module::class, |
| 311 | 311 | 'root' => '@app/views', |
| 312 | 312 | 'layout' => '@backend/views/layouts/box', |
| 313 | - 'allowedIPs' => ['*'], |
|
| 314 | - 'roles' => ['translate-module'], |
|
| 313 | + 'allowedIPs' => [ '*' ], |
|
| 314 | + 'roles' => [ 'translate-module' ], |
|
| 315 | 315 | ], |
| 316 | 316 | 'user' => [ |
| 317 | 317 | 'class' => \dektrium\user\Module::class, |
| 318 | 318 | 'layout' => '@app/views/layouts/container', |
| 319 | 319 | 'defaultRoute' => 'admin', |
| 320 | 320 | 'adminPermission' => 'user-module', |
| 321 | - 'admins' => ['admin'], // TODO: see https://github.com/dektrium/yii2-user/issues/1016 |
|
| 321 | + 'admins' => [ 'admin' ], // TODO: see https://github.com/dektrium/yii2-user/issues/1016 |
|
| 322 | 322 | 'enableFlashMessages' => false, |
| 323 | 323 | 'enableRegistration' => getenv('APP_USER_ENABLE_REGISTRATION'), |
| 324 | 324 | ], |
@@ -60,7 +60,7 @@ |
||
| 60 | 60 | 'class' => \yii\log\FileTarget::class, |
| 61 | 61 | 'logFile' => '@runtime/logs/console.log', |
| 62 | 62 | //'levels' => ['info', 'trace'], |
| 63 | - 'logVars' => [], |
|
| 63 | + 'logVars' => [ ], |
|
| 64 | 64 | 'dirMode' => YII_ENV_DEV ? 0777 : null, |
| 65 | 65 | 'fileMode' => YII_ENV_DEV ? 0666 : null, |
| 66 | 66 | 'enabled' => YII_DEBUG && !YII_ENV_TEST, |