@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | return $this->accessError(); |
| 62 | 62 | } |
| 63 | 63 | |
| 64 | - $this->additionFields['categories'] = Category::getMenu(); |
|
| 64 | + $this->additionFields[ 'categories' ] = Category::getMenu(); |
|
| 65 | 65 | |
| 66 | 66 | return parent::actionCreate(); |
| 67 | 67 | } |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | return $this->accessError(); |
| 78 | 78 | } |
| 79 | 79 | |
| 80 | - $this->additionFields['categories'] = Category::getMenu(); |
|
| 80 | + $this->additionFields[ 'categories' ] = Category::getMenu(); |
|
| 81 | 81 | |
| 82 | 82 | return parent::actionUpdate($id); |
| 83 | 83 | } |
@@ -31,10 +31,10 @@ discard block |
||
| 31 | 31 | */ |
| 32 | 32 | public function beforeAction($action) |
| 33 | 33 | { |
| 34 | - $this->view->params['pages'] = Page::getActiveMenu(); |
|
| 35 | - $this->view->params['categories'] = Category::getActiveMenu(); |
|
| 36 | - $this->view->params['contacts'] = Contact::getDefaultContacts(); |
|
| 37 | - $this->view->params['controllerId'] = Yii::$app->controller->id; |
|
| 34 | + $this->view->params[ 'pages' ] = Page::getActiveMenu(); |
|
| 35 | + $this->view->params[ 'categories' ] = Category::getActiveMenu(); |
|
| 36 | + $this->view->params[ 'contacts' ] = Contact::getDefaultContacts(); |
|
| 37 | + $this->view->params[ 'controllerId' ] = Yii::$app->controller->id; |
|
| 38 | 38 | |
| 39 | 39 | return parent::beforeAction($action); |
| 40 | 40 | } |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | $this->view->registerLinkTag([ |
| 76 | 76 | 'rel' => 'alternate', |
| 77 | 77 | 'hreflang' => $shortName, |
| 78 | - 'href' => rtrim(Yii::$app->request->hostInfo, '/') . |
|
| 78 | + 'href' => rtrim(Yii::$app->request->hostInfo, '/'). |
|
| 79 | 79 | BaseHelper::getSwitchLanguageLink($shortName, Yii::$app->request) |
| 80 | 80 | ]); |
| 81 | 81 | } |
@@ -25,15 +25,15 @@ |
||
| 25 | 25 | 'rules' => [ |
| 26 | 26 | [ |
| 27 | 27 | 'allow' => true, |
| 28 | - 'actions' => ['view'], |
|
| 29 | - 'roles' => ['?', '@'], |
|
| 28 | + 'actions' => [ 'view' ], |
|
| 29 | + 'roles' => [ '?', '@' ], |
|
| 30 | 30 | ], |
| 31 | 31 | ], |
| 32 | 32 | ], |
| 33 | 33 | 'verbs' => [ |
| 34 | 34 | 'class' => VerbFilter::class, |
| 35 | 35 | 'actions' => [ |
| 36 | - 'view' => ['get'], |
|
| 36 | + 'view' => [ 'get' ], |
|
| 37 | 37 | ], |
| 38 | 38 | ], |
| 39 | 39 | ]); |
@@ -3,17 +3,17 @@ |
||
| 3 | 3 | |
| 4 | 4 | /* @var Article $model */ |
| 5 | 5 | |
| 6 | -$this->params['breadcrumbs'][] = $model->{'title_'.$this->params['shortLanguage']}; |
|
| 6 | +$this->params[ 'breadcrumbs' ][ ] = $model->{'title_'.$this->params[ 'shortLanguage' ]}; |
|
| 7 | 7 | ?> |
| 8 | 8 | |
| 9 | -<?php if (!empty($model->{'content_'.$this->params['shortLanguage']})): ?> |
|
| 9 | +<?php if (!empty($model->{'content_'.$this->params[ 'shortLanguage' ]})): ?> |
|
| 10 | 10 | <section class="inform_block"> |
| 11 | 11 | |
| 12 | 12 | <div class="container"> |
| 13 | 13 | |
| 14 | 14 | <div class="row" data-animated="fadeIn"> |
| 15 | 15 | <div class="col-lg-12 col-md-12 col-sm-10"> |
| 16 | - <?php echo $model->{'content_'.$this->params['shortLanguage']} ?> |
|
| 16 | + <?php echo $model->{'content_'.$this->params[ 'shortLanguage' ]} ?> |
|
| 17 | 17 | </div> |
| 18 | 18 | </div> |
| 19 | 19 | </div> |
@@ -45,8 +45,8 @@ discard block |
||
| 45 | 45 | ])->label(Yii::t('app', 'Icon html class')); ?> |
| 46 | 46 | <div class="row" style="margin-bottom: 15px;"> |
| 47 | 47 | <div class="col-md-12"> |
| 48 | - <?php if(!$model->mainModel->isNewRecord): ?> |
|
| 49 | - <?php echo Html::tag('i', '', ['class' => empty($model->mainModel->icon) ? 'fa fa-file fa-2x' : $model->mainModel->icon]) ?> |
|
| 48 | + <?php if (!$model->mainModel->isNewRecord): ?> |
|
| 49 | + <?php echo Html::tag('i', '', [ 'class' => empty($model->mainModel->icon) ? 'fa fa-file fa-2x' : $model->mainModel->icon ]) ?> |
|
| 50 | 50 | <?php endif; ?> |
| 51 | 51 | <?php echo Html::a('Fontawesome icons', Url::to('https://fontawesome.ru/all-icons/'), [ |
| 52 | 52 | 'target' => '_blank' |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | <?php |
| 55 | 55 | Modal::begin([ |
| 56 | 56 | 'header' => '<h2>Fe icons</h2>', |
| 57 | - 'toggleButton' => ['label' => 'Fe icons'] |
|
| 57 | + 'toggleButton' => [ 'label' => 'Fe icons' ] |
|
| 58 | 58 | ]); |
| 59 | 59 | require __DIR__.'/../icons/fe-icons.php'; |
| 60 | 60 | Modal::end(); |
@@ -88,10 +88,10 @@ discard block |
||
| 88 | 88 | 'filebrowserWindowHeight' => '700', |
| 89 | 89 | 'extraPlugins' => 'pbckcode', |
| 90 | 90 | 'toolbarGroups' => [ |
| 91 | - ['name' => 'pbckcode'] |
|
| 91 | + [ 'name' => 'pbckcode' ] |
|
| 92 | 92 | ], |
| 93 | 93 | 'allowedContent' => true, |
| 94 | - 'language' => $this->params['shortLanguage'], |
|
| 94 | + 'language' => $this->params[ 'shortLanguage' ], |
|
| 95 | 95 | ] |
| 96 | 96 | ], |
| 97 | 97 | [ |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | ])->label(Yii::t('app', 'URL Alias')); ?> |
| 117 | 117 | |
| 118 | 118 | <?php echo $form->field($model, 'active') |
| 119 | - ->radioList([1 => Yii::t('app', 'Active'), 0 => Yii::t('app', 'Inactive')]) |
|
| 119 | + ->radioList([ 1 => Yii::t('app', 'Active'), 0 => Yii::t('app', 'Inactive') ]) |
|
| 120 | 120 | ->label(Yii::t('app', 'Active status')); ?> |
| 121 | 121 | |
| 122 | 122 | <?php echo Html::label(Yii::t('app', 'Parent object'), 'multi-level-menu', [ |
@@ -131,8 +131,8 @@ discard block |
||
| 131 | 131 | ], |
| 132 | 132 | 'mainContainerOptions' => [ |
| 133 | 133 | 'levels' => [ |
| 134 | - ['style' => 'margin-left: 0; padding-left: 0;'], |
|
| 135 | - ['style' => 'margin-left: 10px; padding-left: 10px;'], |
|
| 134 | + [ 'style' => 'margin-left: 0; padding-left: 0;' ], |
|
| 135 | + [ 'style' => 'margin-left: 10px; padding-left: 10px;' ], |
|
| 136 | 136 | ] |
| 137 | 137 | ], |
| 138 | 138 | 'itemContainerOptions' => [ |
@@ -145,7 +145,7 @@ discard block |
||
| 145 | 145 | <div class="panel-heading"><?php echo MFUModule::t('main', 'New files'); ?></div> |
| 146 | 146 | <div class="panel-body"> |
| 147 | 147 | <div class="row"> |
| 148 | - <?php for ($i=1; $i < 5; $i++): ?> |
|
| 148 | + <?php for ($i = 1; $i < 5; $i++): ?> |
|
| 149 | 149 | <div class="col-12 col-lg-6" style="margin-top: 5px; margin-bottom: 10px;"> |
| 150 | 150 | <?php echo $this->render('../mediafiles/_new-mediafiles', [ |
| 151 | 151 | 'model' => $model, |
@@ -161,14 +161,14 @@ discard block |
||
| 161 | 161 | <!-- New files end --> |
| 162 | 162 | |
| 163 | 163 | <!-- Existing files begin --> |
| 164 | - <?php if (!$model->mainModel->isNewRecord && $images['pagination']->totalCount > 0): ?> |
|
| 164 | + <?php if (!$model->mainModel->isNewRecord && $images[ 'pagination' ]->totalCount > 0): ?> |
|
| 165 | 165 | <div class="panel panel-default"> |
| 166 | 166 | <div class="panel-heading"><?php echo MFUModule::t('main', 'Existing files'); ?></div> |
| 167 | 167 | <div class="panel-body"> |
| 168 | 168 | <?php echo $this->render('../mediafiles/_existing-mediafiles', [ |
| 169 | 169 | 'model' => $model, |
| 170 | - 'mediafiles' => $images['items'], |
|
| 171 | - 'pages' => $images['pagination'], |
|
| 170 | + 'mediafiles' => $images[ 'items' ], |
|
| 171 | + 'pages' => $images[ 'pagination' ], |
|
| 172 | 172 | 'fileType' => UploadModelInterface::FILE_TYPE_IMAGE, |
| 173 | 173 | 'ownerParams' => isset($ownerParams) && is_array($ownerParams) ? $ownerParams : null, |
| 174 | 174 | ]) ?> |
@@ -17,17 +17,17 @@ discard block |
||
| 17 | 17 | /* @var $images array */ |
| 18 | 18 | /* @var $images_pagination Pagination */ |
| 19 | 19 | |
| 20 | -$images_items = $images['items']; |
|
| 21 | -$images_pagination = $images['pagination']; |
|
| 20 | +$images_items = $images[ 'items' ]; |
|
| 21 | +$images_pagination = $images[ 'pagination' ]; |
|
| 22 | 22 | |
| 23 | 23 | $this->title = $model->getDefaultTranslate('title'); |
| 24 | -$this->params['breadcrumbs'][] = [ |
|
| 24 | +$this->params[ 'breadcrumbs' ][ ] = [ |
|
| 25 | 25 | 'label' => Yii::t('pages', 'Pages'), |
| 26 | 26 | 'url' => [ |
| 27 | - $this->params['urlPrefix'].'index' |
|
| 27 | + $this->params[ 'urlPrefix' ].'index' |
|
| 28 | 28 | ] |
| 29 | 29 | ]; |
| 30 | -$this->params['breadcrumbs'][] = $this->title; |
|
| 30 | +$this->params[ 'breadcrumbs' ][ ] = $this->title; |
|
| 31 | 31 | ?> |
| 32 | 32 | |
| 33 | 33 | <style> |
@@ -41,14 +41,14 @@ discard block |
||
| 41 | 41 | |
| 42 | 42 | <p> |
| 43 | 43 | <?php echo Html::a(Yii::t('app', 'Update'), [ |
| 44 | - $this->params['urlPrefix'].'update', |
|
| 44 | + $this->params[ 'urlPrefix' ].'update', |
|
| 45 | 45 | 'id' => $model->id |
| 46 | 46 | ], [ |
| 47 | 47 | 'class' => 'btn btn-primary' |
| 48 | 48 | ]) ?> |
| 49 | 49 | |
| 50 | 50 | <?php echo Html::a(Yii::t('app', 'Delete'), [ |
| 51 | - $this->params['urlPrefix'].'delete', |
|
| 51 | + $this->params[ 'urlPrefix' ].'delete', |
|
| 52 | 52 | 'id' => $model->id |
| 53 | 53 | ], [ |
| 54 | 54 | 'class' => 'btn btn-danger', |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | 'id', |
| 94 | 94 | 'thumbnail' => [ |
| 95 | 95 | 'label' => MFUModule::t('main', 'Thumbnail'), |
| 96 | - 'value' => function ($model) { |
|
| 96 | + 'value' => function($model) { |
|
| 97 | 97 | /* @var $model Page */ |
| 98 | 98 | $thumbnailModel = $model->getThumbnailModel(); |
| 99 | 99 | return $thumbnailModel == null ? '' : Html::a($model->getDefaultThumbImage(), Url::to($thumbnailModel->getThumbUrl(MFUModule::THUMB_ALIAS_LARGE)), [ |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | 'label' => Yii::t('app', 'Icon'), |
| 107 | 107 | 'value' => function($model) { |
| 108 | 108 | /* @var $model Page */ |
| 109 | - return Html::tag('i', '', ['class' => empty($model->icon) ? 'fa fa-file fa-2x' : $model->icon]); |
|
| 109 | + return Html::tag('i', '', [ 'class' => empty($model->icon) ? 'fa fa-file fa-2x' : $model->icon ]); |
|
| 110 | 110 | }, |
| 111 | 111 | 'format' => 'raw', |
| 112 | 112 | ], |
@@ -118,22 +118,22 @@ discard block |
||
| 118 | 118 | 'label' => Yii::t('app', 'Active status'), |
| 119 | 119 | 'value' => function($model) { |
| 120 | 120 | /* @var $model Page */ |
| 121 | - if ($model->active == 1){ |
|
| 122 | - return '<i class="fa fa-check-circle text-success"> ' . Yii::t('app', 'Active') . '</i>'; |
|
| 121 | + if ($model->active == 1) { |
|
| 122 | + return '<i class="fa fa-check-circle text-success"> '.Yii::t('app', 'Active').'</i>'; |
|
| 123 | 123 | } else { |
| 124 | - return '<i class="fa fa-times text-danger"> ' . Yii::t('app', 'Inactive') . '</i>'; |
|
| 124 | + return '<i class="fa fa-times text-danger"> '.Yii::t('app', 'Inactive').'</i>'; |
|
| 125 | 125 | } |
| 126 | 126 | }, |
| 127 | 127 | 'format' => 'raw', |
| 128 | 128 | ], |
| 129 | 129 | [ |
| 130 | 130 | 'attribute' => 'created_at', |
| 131 | - 'format' => ['date', 'dd.MM.Y HH:mm:ss'], |
|
| 131 | + 'format' => [ 'date', 'dd.MM.Y HH:mm:ss' ], |
|
| 132 | 132 | 'label' => Yii::t('app', 'Created date'), |
| 133 | 133 | ], |
| 134 | 134 | [ |
| 135 | 135 | 'attribute' => 'updated_at', |
| 136 | - 'format' => ['date', 'dd.MM.Y HH:mm:ss'], |
|
| 136 | + 'format' => [ 'date', 'dd.MM.Y HH:mm:ss' ], |
|
| 137 | 137 | 'label' => Yii::t('app', 'Updated date'), |
| 138 | 138 | ], |
| 139 | 139 | ], |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | return Html::a( |
| 170 | 170 | $item->getDefaultThumbImage(), |
| 171 | 171 | Url::to([ |
| 172 | - '/'.$this->params['shortLanguage'].'/mfuploader/'.$item->getFileType($item->type).'-album/view', 'id' => $item->id |
|
| 172 | + '/'.$this->params[ 'shortLanguage' ].'/mfuploader/'.$item->getFileType($item->type).'-album/view', 'id' => $item->id |
|
| 173 | 173 | ]) |
| 174 | 174 | ); |
| 175 | 175 | }, |
@@ -182,7 +182,7 @@ discard block |
||
| 182 | 182 | return Html::a( |
| 183 | 183 | Html::encode($item->title), |
| 184 | 184 | Url::to([ |
| 185 | - '/'.$this->params['shortLanguage'].'/mfuploader/'.$item->getFileType($item->type).'-album/view', 'id' => $item->id |
|
| 185 | + '/'.$this->params[ 'shortLanguage' ].'/mfuploader/'.$item->getFileType($item->type).'-album/view', 'id' => $item->id |
|
| 186 | 186 | ]) |
| 187 | 187 | ); |
| 188 | 188 | }, |
@@ -200,7 +200,7 @@ discard block |
||
| 200 | 200 | <?php endif; ?> |
| 201 | 201 | |
| 202 | 202 | <?php echo Html::a(Yii::t('pages', 'View articles'), [ |
| 203 | - '/'.$this->params['shortLanguage'].'/admin/articles/index', 'ArticleSearch[pageId]' => $model->id |
|
| 203 | + '/'.$this->params[ 'shortLanguage' ].'/admin/articles/index', 'ArticleSearch[pageId]' => $model->id |
|
| 204 | 204 | ], [ |
| 205 | 205 | 'class' => 'btn btn-primary' |
| 206 | 206 | ]) ?> |
@@ -6,21 +6,21 @@ |
||
| 6 | 6 | /* @var $albums Itstructure\MFUploader\models\album\Album[] */ |
| 7 | 7 | /* @var $images array */ |
| 8 | 8 | |
| 9 | -$this->title = Yii::t('pages', 'Update page').': ' . $model->mainModel->getDefaultTranslate('title'); |
|
| 10 | -$this->params['breadcrumbs'][] = [ |
|
| 9 | +$this->title = Yii::t('pages', 'Update page').': '.$model->mainModel->getDefaultTranslate('title'); |
|
| 10 | +$this->params[ 'breadcrumbs' ][ ] = [ |
|
| 11 | 11 | 'label' => Yii::t('pages', 'Pages'), |
| 12 | 12 | 'url' => [ |
| 13 | - $this->params['urlPrefix'].'index' |
|
| 13 | + $this->params[ 'urlPrefix' ].'index' |
|
| 14 | 14 | ] |
| 15 | 15 | ]; |
| 16 | -$this->params['breadcrumbs'][] = [ |
|
| 16 | +$this->params[ 'breadcrumbs' ][ ] = [ |
|
| 17 | 17 | 'label' => $model->mainModel->getDefaultTranslate('title'), |
| 18 | 18 | 'url' => [ |
| 19 | - $this->params['urlPrefix'].'view', |
|
| 19 | + $this->params[ 'urlPrefix' ].'view', |
|
| 20 | 20 | 'id' => $model->id |
| 21 | 21 | ] |
| 22 | 22 | ]; |
| 23 | -$this->params['breadcrumbs'][] = Yii::t('app', 'Update'); |
|
| 23 | +$this->params[ 'breadcrumbs' ][ ] = Yii::t('app', 'Update'); |
|
| 24 | 24 | ?> |
| 25 | 25 | <div class="page-update"> |
| 26 | 26 | |
@@ -28,8 +28,8 @@ discard block |
||
| 28 | 28 | ])->label(Yii::t('app', 'Icon html class')); ?> |
| 29 | 29 | <div class="row" style="margin-bottom: 15px;"> |
| 30 | 30 | <div class="col-md-12"> |
| 31 | - <?php if(!$model->mainModel->isNewRecord): ?> |
|
| 32 | - <?php echo Html::tag('i', '', ['class' => empty($model->mainModel->icon) ? 'fa fa-file fa-2x' : $model->mainModel->icon]) ?> |
|
| 31 | + <?php if (!$model->mainModel->isNewRecord): ?> |
|
| 32 | + <?php echo Html::tag('i', '', [ 'class' => empty($model->mainModel->icon) ? 'fa fa-file fa-2x' : $model->mainModel->icon ]) ?> |
|
| 33 | 33 | <?php endif; ?> |
| 34 | 34 | <?php echo Html::a('Fontawesome icons', Url::to('https://fontawesome.ru/all-icons/'), [ |
| 35 | 35 | 'target' => '_blank' |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | <?php |
| 38 | 38 | Modal::begin([ |
| 39 | 39 | 'header' => '<h2>Fe icons</h2>', |
| 40 | - 'toggleButton' => ['label' => 'Fe icons'] |
|
| 40 | + 'toggleButton' => [ 'label' => 'Fe icons' ] |
|
| 41 | 41 | ]); |
| 42 | 42 | require __DIR__.'/../icons/fe-icons.php'; |
| 43 | 43 | Modal::end(); |
@@ -71,10 +71,10 @@ discard block |
||
| 71 | 71 | 'filebrowserWindowHeight' => '700', |
| 72 | 72 | 'extraPlugins' => 'pbckcode', |
| 73 | 73 | 'toolbarGroups' => [ |
| 74 | - ['name' => 'pbckcode'] |
|
| 74 | + [ 'name' => 'pbckcode' ] |
|
| 75 | 75 | ], |
| 76 | 76 | 'allowedContent' => true, |
| 77 | - 'language' => $this->params['shortLanguage'], |
|
| 77 | + 'language' => $this->params[ 'shortLanguage' ], |
|
| 78 | 78 | ] |
| 79 | 79 | ], |
| 80 | 80 | [ |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | ])->label(Yii::t('app', 'URL Alias')); ?> |
| 100 | 100 | |
| 101 | 101 | <?php echo $form->field($model, 'active') |
| 102 | - ->radioList([1 => Yii::t('app', 'Active'), 0 => Yii::t('app', 'Inactive')]) |
|
| 102 | + ->radioList([ 1 => Yii::t('app', 'Active'), 0 => Yii::t('app', 'Inactive') ]) |
|
| 103 | 103 | ->label(Yii::t('app', 'Active status')); ?> |
| 104 | 104 | |
| 105 | 105 | <?php echo Html::label(Yii::t('app', 'Parent object'), 'multi-level-menu', [ |
@@ -114,8 +114,8 @@ discard block |
||
| 114 | 114 | ], |
| 115 | 115 | 'mainContainerOptions' => [ |
| 116 | 116 | 'levels' => [ |
| 117 | - ['style' => 'margin-left: 0; padding-left: 0;'], |
|
| 118 | - ['style' => 'margin-left: 10px; padding-left: 10px;'], |
|
| 117 | + [ 'style' => 'margin-left: 0; padding-left: 0;' ], |
|
| 118 | + [ 'style' => 'margin-left: 10px; padding-left: 10px;' ], |
|
| 119 | 119 | ] |
| 120 | 120 | ], |
| 121 | 121 | 'itemContainerOptions' => [ |
@@ -10,13 +10,13 @@ discard block |
||
| 10 | 10 | /* @var $model Category */ |
| 11 | 11 | |
| 12 | 12 | $this->title = $model->getDefaultTranslate('title'); |
| 13 | -$this->params['breadcrumbs'][] = [ |
|
| 13 | +$this->params[ 'breadcrumbs' ][ ] = [ |
|
| 14 | 14 | 'label' => Yii::t('categories', 'Categories'), |
| 15 | 15 | 'url' => [ |
| 16 | - $this->params['urlPrefix'].'index' |
|
| 16 | + $this->params[ 'urlPrefix' ].'index' |
|
| 17 | 17 | ] |
| 18 | 18 | ]; |
| 19 | -$this->params['breadcrumbs'][] = $this->title; |
|
| 19 | +$this->params[ 'breadcrumbs' ][ ] = $this->title; |
|
| 20 | 20 | ?> |
| 21 | 21 | |
| 22 | 22 | <style> |
@@ -30,14 +30,14 @@ discard block |
||
| 30 | 30 | |
| 31 | 31 | <p> |
| 32 | 32 | <?php echo Html::a(Yii::t('app', 'Update'), [ |
| 33 | - $this->params['urlPrefix'].'update', |
|
| 33 | + $this->params[ 'urlPrefix' ].'update', |
|
| 34 | 34 | 'id' => $model->id |
| 35 | 35 | ], [ |
| 36 | 36 | 'class' => 'btn btn-primary' |
| 37 | 37 | ]) ?> |
| 38 | 38 | |
| 39 | 39 | <?php echo Html::a(Yii::t('app', 'Delete'), [ |
| 40 | - $this->params['urlPrefix'].'delete', |
|
| 40 | + $this->params[ 'urlPrefix' ].'delete', |
|
| 41 | 41 | 'id' => $model->id |
| 42 | 42 | ], [ |
| 43 | 43 | 'class' => 'btn btn-danger', |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | 'label' => Yii::t('app', 'Icon'), |
| 85 | 85 | 'value' => function($model) { |
| 86 | 86 | /* @var $model Category */ |
| 87 | - return Html::tag('i', '', ['class' => empty($model->icon) ? 'fa fa-file fa-2x' : $model->icon]); |
|
| 87 | + return Html::tag('i', '', [ 'class' => empty($model->icon) ? 'fa fa-file fa-2x' : $model->icon ]); |
|
| 88 | 88 | }, |
| 89 | 89 | 'format' => 'raw', |
| 90 | 90 | ], |
@@ -96,29 +96,29 @@ discard block |
||
| 96 | 96 | 'label' => Yii::t('app', 'Active status'), |
| 97 | 97 | 'value' => function($model) { |
| 98 | 98 | /* @var $model Category */ |
| 99 | - if ($model->active == 1){ |
|
| 100 | - return '<i class="fa fa-check-circle text-success"> ' . Yii::t('app', 'Active') . '</i>'; |
|
| 99 | + if ($model->active == 1) { |
|
| 100 | + return '<i class="fa fa-check-circle text-success"> '.Yii::t('app', 'Active').'</i>'; |
|
| 101 | 101 | } else { |
| 102 | - return '<i class="fa fa-times text-danger"> ' . Yii::t('app', 'Inactive') . '</i>'; |
|
| 102 | + return '<i class="fa fa-times text-danger"> '.Yii::t('app', 'Inactive').'</i>'; |
|
| 103 | 103 | } |
| 104 | 104 | }, |
| 105 | 105 | 'format' => 'raw', |
| 106 | 106 | ], |
| 107 | 107 | [ |
| 108 | 108 | 'attribute' => 'created_at', |
| 109 | - 'format' => ['date', 'dd.MM.Y HH:mm:ss'], |
|
| 109 | + 'format' => [ 'date', 'dd.MM.Y HH:mm:ss' ], |
|
| 110 | 110 | 'label' => Yii::t('app', 'Created date'), |
| 111 | 111 | ], |
| 112 | 112 | [ |
| 113 | 113 | 'attribute' => 'updated_at', |
| 114 | - 'format' => ['date', 'dd.MM.Y HH:mm:ss'], |
|
| 114 | + 'format' => [ 'date', 'dd.MM.Y HH:mm:ss' ], |
|
| 115 | 115 | 'label' => Yii::t('app', 'Updated date'), |
| 116 | 116 | ], |
| 117 | 117 | ], |
| 118 | 118 | ]) ?> |
| 119 | 119 | |
| 120 | 120 | <?php echo Html::a(Yii::t('categories', 'View products'), [ |
| 121 | - '/'.$this->params['shortLanguage'].'/admin/products/index', 'ProductSearch[categoryId]' => $model->id |
|
| 121 | + '/'.$this->params[ 'shortLanguage' ].'/admin/products/index', 'ProductSearch[categoryId]' => $model->id |
|
| 122 | 122 | ], [ |
| 123 | 123 | 'class' => 'btn btn-primary' |
| 124 | 124 | ]) ?> |