@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | 'social_id' |
| 50 | 50 | ], |
| 51 | 51 | 'unique', |
| 52 | - 'targetAttribute' => ['contacts_id', 'social_id'] |
|
| 52 | + 'targetAttribute' => [ 'contacts_id', 'social_id' ] |
|
| 53 | 53 | ], |
| 54 | 54 | [ |
| 55 | 55 | [ |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | 'exist', |
| 59 | 59 | 'skipOnError' => true, |
| 60 | 60 | 'targetClass' => Contact::class, |
| 61 | - 'targetAttribute' => ['contacts_id' => 'id'] |
|
| 61 | + 'targetAttribute' => [ 'contacts_id' => 'id' ] |
|
| 62 | 62 | ], |
| 63 | 63 | [ |
| 64 | 64 | [ |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | 'exist', |
| 68 | 68 | 'skipOnError' => true, |
| 69 | 69 | 'targetClass' => Social::class, |
| 70 | - 'targetAttribute' => ['social_id' => 'id'] |
|
| 70 | + 'targetAttribute' => [ 'social_id' => 'id' ] |
|
| 71 | 71 | ], |
| 72 | 72 | ]; |
| 73 | 73 | } |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | */ |
| 110 | 110 | public function getSettings() |
| 111 | 111 | { |
| 112 | - $result = $this->db->createCommand('SELECT * FROM ' . $this->tableName) |
|
| 112 | + $result = $this->db->createCommand('SELECT * FROM '.$this->tableName) |
|
| 113 | 113 | ->queryOne(); |
| 114 | 114 | |
| 115 | 115 | $this->setAttributes($result, false); |
@@ -128,14 +128,14 @@ discard block |
||
| 128 | 128 | return false; |
| 129 | 129 | } |
| 130 | 130 | |
| 131 | - $count = (int)$this->db->createCommand('SELECT COUNT(*) FROM ' . $this->tableName)->queryScalar(); |
|
| 131 | + $count = (int)$this->db->createCommand('SELECT COUNT(*) FROM '.$this->tableName)->queryScalar(); |
|
| 132 | 132 | |
| 133 | 133 | if ($count > 0) { |
| 134 | - $result = $this->db->createCommand('UPDATE ' . $this->tableName. ' SET ' . $this->queryUpdateAttributes()) |
|
| 134 | + $result = $this->db->createCommand('UPDATE '.$this->tableName.' SET '.$this->queryUpdateAttributes()) |
|
| 135 | 135 | ->bindValues($this->attributesToBind()) |
| 136 | 136 | ->execute(); |
| 137 | 137 | } else { |
| 138 | - $result = $this->db->createCommand('INSERT INTO ' . $this->tableName. ' ' . $this->queryInsertAttributes()) |
|
| 138 | + $result = $this->db->createCommand('INSERT INTO '.$this->tableName.' '.$this->queryInsertAttributes()) |
|
| 139 | 139 | ->bindValues($this->attributesToBind()) |
| 140 | 140 | ->execute(); |
| 141 | 141 | } |
@@ -152,10 +152,10 @@ discard block |
||
| 152 | 152 | */ |
| 153 | 153 | private function attributesToBind(): array |
| 154 | 154 | { |
| 155 | - $attributesToBind = []; |
|
| 155 | + $attributesToBind = [ ]; |
|
| 156 | 156 | |
| 157 | 157 | foreach ($this->getAttributes() as $name => $value) { |
| 158 | - $attributesToBind[':' . $name] = $value; |
|
| 158 | + $attributesToBind[ ':'.$name ] = $value; |
|
| 159 | 159 | } |
| 160 | 160 | |
| 161 | 161 | return $attributesToBind; |
@@ -166,10 +166,10 @@ discard block |
||
| 166 | 166 | */ |
| 167 | 167 | private function queryUpdateAttributes(): string |
| 168 | 168 | { |
| 169 | - $toUpdateArray = []; |
|
| 169 | + $toUpdateArray = [ ]; |
|
| 170 | 170 | |
| 171 | 171 | foreach ($this->getAttributes() as $name => $value) { |
| 172 | - $toUpdateArray[] = $name . ' = :' . $name; |
|
| 172 | + $toUpdateArray[ ] = $name.' = :'.$name; |
|
| 173 | 173 | } |
| 174 | 174 | |
| 175 | 175 | return implode(', ', $toUpdateArray); |
@@ -180,16 +180,16 @@ discard block |
||
| 180 | 180 | */ |
| 181 | 181 | private function queryInsertAttributes(): string |
| 182 | 182 | { |
| 183 | - $toInsertArrayNames = []; |
|
| 184 | - $toInsertArrayValues = []; |
|
| 183 | + $toInsertArrayNames = [ ]; |
|
| 184 | + $toInsertArrayValues = [ ]; |
|
| 185 | 185 | |
| 186 | 186 | foreach ($this->getAttributes() as $name => $value) { |
| 187 | - $toInsertArrayNames[] = $name; |
|
| 188 | - $toInsertArrayValues[] = ':' . $name; |
|
| 187 | + $toInsertArrayNames[ ] = $name; |
|
| 188 | + $toInsertArrayValues[ ] = ':'.$name; |
|
| 189 | 189 | } |
| 190 | 190 | |
| 191 | 191 | return |
| 192 | - ' (' . implode(', ', $toInsertArrayNames) . ') VALUES ' . |
|
| 193 | - ' (' . implode(', ', $toInsertArrayValues) . ') '; |
|
| 192 | + ' ('.implode(', ', $toInsertArrayNames).') VALUES '. |
|
| 193 | + ' ('.implode(', ', $toInsertArrayValues).') '; |
|
| 194 | 194 | } |
| 195 | 195 | } |
@@ -147,7 +147,7 @@ |
||
| 147 | 147 | * |
| 148 | 148 | * @return array |
| 149 | 149 | */ |
| 150 | - public function attributeLabels(){ |
|
| 150 | + public function attributeLabels() { |
|
| 151 | 151 | |
| 152 | 152 | return[ |
| 153 | 153 | 'first_name' => 'First name', |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | 'unique', |
| 126 | 126 | 'skipOnError' => true, |
| 127 | 127 | 'targetClass' => \Yii::$app->user->identityClass, |
| 128 | - 'targetAttribute' => ['login' => 'login'], |
|
| 128 | + 'targetAttribute' => [ 'login' => 'login' ], |
|
| 129 | 129 | 'filter' => $this->getScenario() == self::SCENARIO_UPDATE ? 'id != '.$this->id : '' |
| 130 | 130 | ], |
| 131 | 131 | [ |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | 'unique', |
| 134 | 134 | 'skipOnError' => true, |
| 135 | 135 | 'targetClass' => \Yii::$app->user->identityClass, |
| 136 | - 'targetAttribute' => ['email' => 'email'], |
|
| 136 | + 'targetAttribute' => [ 'email' => 'email' ], |
|
| 137 | 137 | 'filter' => $this->getScenario() == self::SCENARIO_UPDATE ? 'id != '.$this->id : '' |
| 138 | 138 | ], |
| 139 | 139 | [ |
@@ -166,7 +166,7 @@ discard block |
||
| 166 | 166 | 'exist', |
| 167 | 167 | 'skipOnError' => true, |
| 168 | 168 | 'targetClass' => Position::class, |
| 169 | - 'targetAttribute' => ['position_id' => 'id'] |
|
| 169 | + 'targetAttribute' => [ 'position_id' => 'id' ] |
|
| 170 | 170 | ], |
| 171 | 171 | ]; |
| 172 | 172 | } |
@@ -244,7 +244,7 @@ discard block |
||
| 244 | 244 | */ |
| 245 | 245 | public function __get($name) |
| 246 | 246 | { |
| 247 | - $getter = 'get' . $name; |
|
| 247 | + $getter = 'get'.$name; |
|
| 248 | 248 | |
| 249 | 249 | if (method_exists($this, $getter)) { |
| 250 | 250 | return $this->$getter(); |
@@ -267,7 +267,7 @@ discard block |
||
| 267 | 267 | */ |
| 268 | 268 | public function __set($name, $value) |
| 269 | 269 | { |
| 270 | - $setter = 'set' . $name; |
|
| 270 | + $setter = 'set'.$name; |
|
| 271 | 271 | |
| 272 | 272 | if (method_exists($this, $setter)) { |
| 273 | 273 | $this->$setter($value); |
@@ -6,8 +6,8 @@ discard block |
||
| 6 | 6 | use app\models\Contact; |
| 7 | 7 | use Itstructure\MultiLevelMenu\MenuWidget; |
| 8 | 8 | |
| 9 | -$contacts = $this->params['contacts']; |
|
| 10 | -$controllerId = $this->params['controllerId']; |
|
| 9 | +$contacts = $this->params[ 'contacts' ]; |
|
| 10 | +$controllerId = $this->params[ 'controllerId' ]; |
|
| 11 | 11 | |
| 12 | 12 | /* @var \yii\web\View $this */ |
| 13 | 13 | /* @var string $content */ |
@@ -44,49 +44,49 @@ discard block |
||
| 44 | 44 | ]); ?> |
| 45 | 45 | |
| 46 | 46 | <ul class="nav navbar-nav navbar-right"> |
| 47 | - <li class="nav-item <?php if($controllerId=='home'): ?>active<?php endif; ?>"> |
|
| 48 | - <a class="nav-link" href="/<?php echo $this->params['shortLanguage']; ?>"><?php echo Yii::t('app', 'Home') ?></a> |
|
| 47 | + <li class="nav-item <?php if ($controllerId == 'home'): ?>active<?php endif; ?>"> |
|
| 48 | + <a class="nav-link" href="/<?php echo $this->params[ 'shortLanguage' ]; ?>"><?php echo Yii::t('app', 'Home') ?></a> |
|
| 49 | 49 | </li> |
| 50 | - <li class="nav-item <?php if($controllerId=='about'): ?>active<?php endif; ?>"> |
|
| 51 | - <a class="nav-link" href="/<?php echo $this->params['shortLanguage']; ?>/about"><?php echo Yii::t('about', 'About') ?></a> |
|
| 50 | + <li class="nav-item <?php if ($controllerId == 'about'): ?>active<?php endif; ?>"> |
|
| 51 | + <a class="nav-link" href="/<?php echo $this->params[ 'shortLanguage' ]; ?>/about"><?php echo Yii::t('about', 'About') ?></a> |
|
| 52 | 52 | </li> |
| 53 | - <li class="nav-item dropdown <?php if($controllerId=='page'): ?>active<?php endif; ?>"> |
|
| 53 | + <li class="nav-item dropdown <?php if ($controllerId == 'page'): ?>active<?php endif; ?>"> |
|
| 54 | 54 | <a href="#" class="nav-link dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> |
| 55 | 55 | <?php echo Yii::t('pages', 'Pages') ?> |
| 56 | 56 | </a> |
| 57 | 57 | <?php echo MenuWidget::widget([ |
| 58 | - 'data' => $this->params['pages'], |
|
| 58 | + 'data' => $this->params[ 'pages' ], |
|
| 59 | 59 | 'itemTemplate' => '@app/views/menu/pageItem.php', |
| 60 | - 'itemTemplateParams' => function ($level, $item) { |
|
| 60 | + 'itemTemplateParams' => function($level, $item) { |
|
| 61 | 61 | return [ |
| 62 | - 'shortLanguage' => $this->params['shortLanguage'], |
|
| 63 | - 'linkOptions' => isset($item['items']) && count($item['items']) > 0 ? [ |
|
| 62 | + 'shortLanguage' => $this->params[ 'shortLanguage' ], |
|
| 63 | + 'linkOptions' => isset($item[ 'items' ]) && count($item[ 'items' ]) > 0 ? [ |
|
| 64 | 64 | 'class' => 'dropdown-toggle', |
| 65 | 65 | 'data-toggle' => 'dropdown', |
| 66 | 66 | 'aria-haspopup' => 'true', |
| 67 | 67 | 'aria-expanded' => 'false', |
| 68 | - ] : [], |
|
| 68 | + ] : [ ], |
|
| 69 | 69 | ]; |
| 70 | 70 | }, |
| 71 | 71 | 'mainContainerOptions' => [ |
| 72 | 72 | 'class' => 'dropdown-menu' |
| 73 | 73 | ], |
| 74 | - 'itemContainerOptions' => function ($level, $item) { |
|
| 74 | + 'itemContainerOptions' => function($level, $item) { |
|
| 75 | 75 | return [ |
| 76 | - 'class' => isset($item['items']) && count($item['items']) > 0 ? 'dropdown-item dropdown' : 'dropdown-item' |
|
| 76 | + 'class' => isset($item[ 'items' ]) && count($item[ 'items' ]) > 0 ? 'dropdown-item dropdown' : 'dropdown-item' |
|
| 77 | 77 | ]; |
| 78 | 78 | } |
| 79 | 79 | ]) ?> |
| 80 | 80 | </li> |
| 81 | - <li class="nav-item <?php if($controllerId=='contact'): ?>active<?php endif; ?>"> |
|
| 82 | - <a class="nav-link" href="/<?php echo $this->params['shortLanguage']; ?>/contact" ><?php echo Yii::t('contacts', 'Contacts') ?></a> |
|
| 81 | + <li class="nav-item <?php if ($controllerId == 'contact'): ?>active<?php endif; ?>"> |
|
| 82 | + <a class="nav-link" href="/<?php echo $this->params[ 'shortLanguage' ]; ?>/contact" ><?php echo Yii::t('contacts', 'Contacts') ?></a> |
|
| 83 | 83 | </li> |
| 84 | 84 | <li class="nav-item dropdown"> |
| 85 | 85 | <a href="#" class="nav-link dropdown-toggle" id="dropdown_languages" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> |
| 86 | 86 | <?php echo Yii::t('site', 'Languages') ?> |
| 87 | 87 | </a> |
| 88 | 88 | <?php echo MenuWidget::widget([ |
| 89 | - 'data' => $this->params['languages'], |
|
| 89 | + 'data' => $this->params[ 'languages' ], |
|
| 90 | 90 | 'itemTemplate' => '@app/views/menu/languageItem.php', |
| 91 | 91 | 'mainContainerOptions' => [ |
| 92 | 92 | 'class' => 'dropdown-menu', |
@@ -104,10 +104,10 @@ discard block |
||
| 104 | 104 | </a> |
| 105 | 105 | <ul class="dropdown-menu"> |
| 106 | 106 | <li class="dropdown-item"> |
| 107 | - <a href="/<?php echo $this->params['shortLanguage']; ?>/reg" ><?php echo Yii::t('site', 'Register') ?></a> |
|
| 107 | + <a href="/<?php echo $this->params[ 'shortLanguage' ]; ?>/reg" ><?php echo Yii::t('site', 'Register') ?></a> |
|
| 108 | 108 | </li> |
| 109 | 109 | <li class="dropdown-item"> |
| 110 | - <a href="/<?php echo $this->params['shortLanguage']; ?>/login" ><?php echo Yii::t('site', 'Login') ?></a> |
|
| 110 | + <a href="/<?php echo $this->params[ 'shortLanguage' ]; ?>/login" ><?php echo Yii::t('site', 'Login') ?></a> |
|
| 111 | 111 | </li> |
| 112 | 112 | </ul> |
| 113 | 113 | </li> |
@@ -118,10 +118,10 @@ discard block |
||
| 118 | 118 | </a> |
| 119 | 119 | <ul class="dropdown-menu"> |
| 120 | 120 | <li class="dropdown-item"> |
| 121 | - <a href="/<?php echo $this->params['shortLanguage']; ?>/admin" ><?php echo Yii::t('site', 'Dashboard') ?></a> |
|
| 121 | + <a href="/<?php echo $this->params[ 'shortLanguage' ]; ?>/admin" ><?php echo Yii::t('site', 'Dashboard') ?></a> |
|
| 122 | 122 | </li> |
| 123 | 123 | <li class="dropdown-item"> |
| 124 | - <a href="/<?php echo $this->params['shortLanguage']; ?>/logout" ><?php echo Yii::t('site', 'Sign out') ?></a> |
|
| 124 | + <a href="/<?php echo $this->params[ 'shortLanguage' ]; ?>/logout" ><?php echo Yii::t('site', 'Sign out') ?></a> |
|
| 125 | 125 | </li> |
| 126 | 126 | </ul> |
| 127 | 127 | </li> |
@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | <?php NavBar::end(); ?> |
| 132 | 132 | |
| 133 | 133 | <div class="container"> |
| 134 | - <?php if (isset($this->params['breadcrumbs'])): ?> |
|
| 134 | + <?php if (isset($this->params[ 'breadcrumbs' ])): ?> |
|
| 135 | 135 | <section class="full_width breadcrumbs_block clearfix"> |
| 136 | 136 | <div class="container"> |
| 137 | 137 | <div class="breadcrumbs_content"> |
@@ -141,10 +141,10 @@ discard block |
||
| 141 | 141 | 'options' => [ |
| 142 | 142 | 'class' => 'pull-right breadcrumb' |
| 143 | 143 | ], |
| 144 | - 'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : [], |
|
| 144 | + 'links' => isset($this->params[ 'breadcrumbs' ]) ? $this->params[ 'breadcrumbs' ] : [ ], |
|
| 145 | 145 | 'homeLink' => [ |
| 146 | 146 | 'label' => Yii::t('yii', 'Home'), |
| 147 | - 'url' => rtrim(Yii::$app->homeUrl, '/') . '/' . $this->params['shortLanguage'], |
|
| 147 | + 'url' => rtrim(Yii::$app->homeUrl, '/').'/'.$this->params[ 'shortLanguage' ], |
|
| 148 | 148 | ] |
| 149 | 149 | ]) ?> |
| 150 | 150 | </div> |
@@ -163,27 +163,27 @@ discard block |
||
| 163 | 163 | <div class="row" data-animated="fadeInUp"> |
| 164 | 164 | <div class="col-lg-7 col-md-8 col-sm-8 padbot30"> |
| 165 | 165 | <ul class="foot_menu"> |
| 166 | - <li <?php if($controllerId=='home'): ?>class="active"<?php endif; ?> > |
|
| 167 | - <a href="/<?php echo $this->params['shortLanguage']; ?>" alt=""><?php echo Yii::t('app', 'Home') ?></a> |
|
| 166 | + <li <?php if ($controllerId == 'home'): ?>class="active"<?php endif; ?> > |
|
| 167 | + <a href="/<?php echo $this->params[ 'shortLanguage' ]; ?>" alt=""><?php echo Yii::t('app', 'Home') ?></a> |
|
| 168 | 168 | </li> |
| 169 | - <li <?php if($controllerId=='about'): ?>class="active"<?php endif; ?> > |
|
| 170 | - <a href="/<?php echo $this->params['shortLanguage']; ?>/about" ><?php echo Yii::t('about', 'About me') ?></a> |
|
| 169 | + <li <?php if ($controllerId == 'about'): ?>class="active"<?php endif; ?> > |
|
| 170 | + <a href="/<?php echo $this->params[ 'shortLanguage' ]; ?>/about" ><?php echo Yii::t('about', 'About me') ?></a> |
|
| 171 | 171 | </li> |
| 172 | - <li <?php if($controllerId=='contact'): ?>class="active"<?php endif; ?> > |
|
| 173 | - <a href="/<?php echo $this->params['shortLanguage']; ?>/contact" ><?php echo Yii::t('contacts', 'Contacts') ?></a> |
|
| 172 | + <li <?php if ($controllerId == 'contact'): ?>class="active"<?php endif; ?> > |
|
| 173 | + <a href="/<?php echo $this->params[ 'shortLanguage' ]; ?>/contact" ><?php echo Yii::t('contacts', 'Contacts') ?></a> |
|
| 174 | 174 | </li> |
| 175 | 175 | </ul> |
| 176 | 176 | <hr> |
| 177 | 177 | <?php if (null !== $contacts): ?> |
| 178 | 178 | <ul class="foot_info"> |
| 179 | - <?php if (!empty($contacts->{'address_'.$this->params['shortLanguage']})): ?> |
|
| 180 | - <li><i class="fa fa-home"></i><?php echo $contacts->{'address_'.$this->params['shortLanguage']} ?></li> |
|
| 179 | + <?php if (!empty($contacts->{'address_'.$this->params[ 'shortLanguage' ]})): ?> |
|
| 180 | + <li><i class="fa fa-home"></i><?php echo $contacts->{'address_'.$this->params[ 'shortLanguage' ]} ?></li> |
|
| 181 | 181 | <?php endif; ?> |
| 182 | - <?php if (!empty($contacts->{'phone_'.$this->params['shortLanguage']})): ?> |
|
| 183 | - <li><i class="fa fa-phone"></i><?php echo $contacts->{'phone_'.$this->params['shortLanguage']} ?></li> |
|
| 182 | + <?php if (!empty($contacts->{'phone_'.$this->params[ 'shortLanguage' ]})): ?> |
|
| 183 | + <li><i class="fa fa-phone"></i><?php echo $contacts->{'phone_'.$this->params[ 'shortLanguage' ]} ?></li> |
|
| 184 | 184 | <?php endif; ?> |
| 185 | - <?php if (!empty($contacts->{'email_'.$this->params['shortLanguage']})): ?> |
|
| 186 | - <li><i class="fa fa-envelope-o"></i><a href="mailto:<?php echo $contacts->{'email_'.$this->params['shortLanguage']} ?>"><?php echo $contacts->{'email_'.$this->params['shortLanguage']} ?></a></li> |
|
| 185 | + <?php if (!empty($contacts->{'email_'.$this->params[ 'shortLanguage' ]})): ?> |
|
| 186 | + <li><i class="fa fa-envelope-o"></i><a href="mailto:<?php echo $contacts->{'email_'.$this->params[ 'shortLanguage' ]} ?>"><?php echo $contacts->{'email_'.$this->params[ 'shortLanguage' ]} ?></a></li> |
|
| 187 | 187 | <?php endif; ?> |
| 188 | 188 | </ul> |
| 189 | 189 | <?php endif; ?> |
@@ -111,14 +111,17 @@ |
||
| 111 | 111 | </li> |
| 112 | 112 | </ul> |
| 113 | 113 | </li> |
| 114 | - <?php else: ?> |
|
| 114 | + <?php else { |
|
| 115 | + : ?> |
|
| 115 | 116 | <li class="nav-item dropdown"> |
| 116 | 117 | <a href="#" class="nav-link dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> |
| 117 | 118 | <?php echo Yii::t('site', 'Account') ?> |
| 118 | 119 | </a> |
| 119 | 120 | <ul class="dropdown-menu"> |
| 120 | 121 | <li class="dropdown-item"> |
| 121 | - <a href="/<?php echo $this->params['shortLanguage']; ?>/admin" ><?php echo Yii::t('site', 'Dashboard') ?></a> |
|
| 122 | + <a href="/<?php echo $this->params['shortLanguage']; |
|
| 123 | +} |
|
| 124 | +?>/admin" ><?php echo Yii::t('site', 'Dashboard') ?></a> |
|
| 122 | 125 | </li> |
| 123 | 126 | <li class="dropdown-item"> |
| 124 | 127 | <a href="/<?php echo $this->params['shortLanguage']; ?>/logout" ><?php echo Yii::t('site', 'Sign out') ?></a> |
@@ -3,17 +3,17 @@ |
||
| 3 | 3 | |
| 4 | 4 | /* @var Product $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> |
@@ -3,14 +3,14 @@ |
||
| 3 | 3 | |
| 4 | 4 | /* @var $model About */ |
| 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 | 9 | <section class="inform_block"> |
| 10 | 10 | <div class="container"> |
| 11 | 11 | <div class="row" data-animated="fadeIn"> |
| 12 | 12 | <div class="col-lg-12 col-md-12 col-sm-10"> |
| 13 | - <?php echo $model->{'content_'.$this->params['shortLanguage']} ?> |
|
| 13 | + <?php echo $model->{'content_'.$this->params[ 'shortLanguage' ]} ?> |
|
| 14 | 14 | </div> |
| 15 | 15 | </div> |
| 16 | 16 | </div> |
@@ -8,17 +8,17 @@ discard block |
||
| 8 | 8 | /* @var Product[] $products */ |
| 9 | 9 | /* @var Pagination $pagination */ |
| 10 | 10 | |
| 11 | -$this->params['breadcrumbs'][] = $model->{'title_'.$this->params['shortLanguage']}; |
|
| 11 | +$this->params[ 'breadcrumbs' ][ ] = $model->{'title_'.$this->params[ 'shortLanguage' ]}; |
|
| 12 | 12 | ?> |
| 13 | 13 | |
| 14 | -<?php if (!empty($model->{'content_'.$this->params['shortLanguage']})): ?> |
|
| 14 | +<?php if (!empty($model->{'content_'.$this->params[ 'shortLanguage' ]})): ?> |
|
| 15 | 15 | <section class="inform_block"> |
| 16 | 16 | |
| 17 | 17 | <div class="container"> |
| 18 | 18 | |
| 19 | 19 | <div class="row" data-animated="fadeIn"> |
| 20 | 20 | <div class="col-lg-12 col-md-12 col-sm-10"> |
| 21 | - <?php echo $model->{'content_'.$this->params['shortLanguage']} ?> |
|
| 21 | + <?php echo $model->{'content_'.$this->params[ 'shortLanguage' ]} ?> |
|
| 22 | 22 | </div> |
| 23 | 23 | </div> |
| 24 | 24 | </div> |
@@ -36,15 +36,15 @@ discard block |
||
| 36 | 36 | <div class="post"> |
| 37 | 37 | <h2> |
| 38 | 38 | <span class="<?php echo $product->icon ?>"></span> |
| 39 | - <a href="<?php echo '/'.$this->params['shortLanguage'].'/product/'.$product->id ?>" alt="<?php echo $product->{'title_'.$this->params['shortLanguage']} ?>"> |
|
| 40 | - <?php echo $product->{'title_'.$this->params['shortLanguage']} ?> |
|
| 39 | + <a href="<?php echo '/'.$this->params[ 'shortLanguage' ].'/product/'.$product->id ?>" alt="<?php echo $product->{'title_'.$this->params[ 'shortLanguage' ]} ?>"> |
|
| 40 | + <?php echo $product->{'title_'.$this->params[ 'shortLanguage' ]} ?> |
|
| 41 | 41 | </a> |
| 42 | 42 | </h2> |
| 43 | 43 | <div class="post_meta"><?php echo Yii::t('products', 'Posted').' '.BaseHelper::getDateAt($product->updated_at) ?></div> |
| 44 | - <?php echo $product->{'description_'.$this->params['shortLanguage']} ?> |
|
| 44 | + <?php echo $product->{'description_'.$this->params[ 'shortLanguage' ]} ?> |
|
| 45 | 45 | </div> |
| 46 | - <?php endforeach;?> |
|
| 47 | - <?php echo LinkPager::widget(['pagination' => $pagination]); ?> |
|
| 46 | + <?php endforeach; ?> |
|
| 47 | + <?php echo LinkPager::widget([ 'pagination' => $pagination ]); ?> |
|
| 48 | 48 | </div> |
| 49 | 49 | </div> |
| 50 | 50 | </div> |
@@ -7,7 +7,7 @@ discard block |
||
| 7 | 7 | /* @var Contact $model */ |
| 8 | 8 | /* @var Feedback $feedback */ |
| 9 | 9 | |
| 10 | -$this->params['breadcrumbs'][] = $model->{'title_'.$this->params['shortLanguage']}; |
|
| 10 | +$this->params[ 'breadcrumbs' ][ ] = $model->{'title_'.$this->params[ 'shortLanguage' ]}; |
|
| 11 | 11 | ?> |
| 12 | 12 | |
| 13 | 13 | <section class="contacts_block"> |
@@ -15,7 +15,7 @@ discard block |
||
| 15 | 15 | <!-- MAP --> |
| 16 | 16 | <div id="map" class="full_width"> |
| 17 | 17 | <iframe width="100%" height="240" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" |
| 18 | - src="https://maps.google.com/maps?f=q&give a hand=s_q&hl=<?php echo $this->params['shortLanguage']; ?>&q=<?php echo $model->mapQ; ?>&ie=UTF8&z=<?php echo $model->mapZoom; ?>&output=embed"></iframe> |
|
| 18 | + src="https://maps.google.com/maps?f=q&give a hand=s_q&hl=<?php echo $this->params[ 'shortLanguage' ]; ?>&q=<?php echo $model->mapQ; ?>&ie=UTF8&z=<?php echo $model->mapZoom; ?>&output=embed"></iframe> |
|
| 19 | 19 | </div><!-- //MAP --> |
| 20 | 20 | |
| 21 | 21 | <div class="container"> |
@@ -37,18 +37,18 @@ discard block |
||
| 37 | 37 | |
| 38 | 38 | <?php else: ?> |
| 39 | 39 | |
| 40 | - <?php $form = ActiveForm::begin(['id' => 'contact-form']); ?> |
|
| 40 | + <?php $form = ActiveForm::begin([ 'id' => 'contact-form' ]); ?> |
|
| 41 | 41 | |
| 42 | - <?php echo $form->field($feedback, 'name')->textInput(['autofocus' => true])->label(Yii::t('feedback', 'Name')) ?> |
|
| 42 | + <?php echo $form->field($feedback, 'name')->textInput([ 'autofocus' => true ])->label(Yii::t('feedback', 'Name')) ?> |
|
| 43 | 43 | |
| 44 | - <?php echo $form->field($feedback, 'email')->textInput(['autofocus' => true])->label(Yii::t('feedback', 'Email')) ?> |
|
| 44 | + <?php echo $form->field($feedback, 'email')->textInput([ 'autofocus' => true ])->label(Yii::t('feedback', 'Email')) ?> |
|
| 45 | 45 | |
| 46 | - <?php echo $form->field($feedback, 'subject')->textInput(['autofocus' => true])->label(Yii::t('feedback', 'Subject')) ?> |
|
| 46 | + <?php echo $form->field($feedback, 'subject')->textInput([ 'autofocus' => true ])->label(Yii::t('feedback', 'Subject')) ?> |
|
| 47 | 47 | |
| 48 | - <?php echo $form->field($feedback, 'message')->textarea(['rows' => 6])->label(Yii::t('feedback', 'Message')) ?> |
|
| 48 | + <?php echo $form->field($feedback, 'message')->textarea([ 'rows' => 6 ])->label(Yii::t('feedback', 'Message')) ?> |
|
| 49 | 49 | |
| 50 | 50 | <?php echo $form->field($feedback, 'verifyCode')->widget(Captcha::class, [ |
| 51 | - 'captchaAction' => '/'.$this->params['shortLanguage'].'/contact/captcha', |
|
| 51 | + 'captchaAction' => '/'.$this->params[ 'shortLanguage' ].'/contact/captcha', |
|
| 52 | 52 | 'template' => '<div class="row"><div class="col-lg-3">{image}</div><div class="col-lg-6">{input}</div></div>', |
| 53 | 53 | ])->label(Yii::t('feedback', 'Verify code')) ?> |
| 54 | 54 | |
@@ -68,14 +68,14 @@ discard block |
||
| 68 | 68 | <h2><?php echo Yii::t('contacts', 'Communication') ?></h2> |
| 69 | 69 | |
| 70 | 70 | <ul> |
| 71 | - <?php if (!empty($model->{'address_'.$this->params['shortLanguage']})): ?> |
|
| 72 | - <li><b class="fa fa-home"></b> <span> <?php echo $model->{'address_'.$this->params['shortLanguage']} ?></span></li> |
|
| 71 | + <?php if (!empty($model->{'address_'.$this->params[ 'shortLanguage' ]})): ?> |
|
| 72 | + <li><b class="fa fa-home"></b> <span> <?php echo $model->{'address_'.$this->params[ 'shortLanguage' ]} ?></span></li> |
|
| 73 | 73 | <?php endif; ?> |
| 74 | - <?php if (!empty($model->{'phone_'.$this->params['shortLanguage']})): ?> |
|
| 75 | - <li><b class="fa fa-phone"></b> <span> <?php echo $model->{'phone_'.$this->params['shortLanguage']} ?></span></li> |
|
| 74 | + <?php if (!empty($model->{'phone_'.$this->params[ 'shortLanguage' ]})): ?> |
|
| 75 | + <li><b class="fa fa-phone"></b> <span> <?php echo $model->{'phone_'.$this->params[ 'shortLanguage' ]} ?></span></li> |
|
| 76 | 76 | <?php endif; ?> |
| 77 | - <?php if (!empty($model->{'email_'.$this->params['shortLanguage']})): ?> |
|
| 78 | - <li><b class="fa fa-envelope-o"></b> <span><a href="mailto:<?php echo $model->{'email_'.$this->params['shortLanguage']} ?>"> <?php echo $model->{'email_'.$this->params['shortLanguage']} ?></a></span></li> |
|
| 77 | + <?php if (!empty($model->{'email_'.$this->params[ 'shortLanguage' ]})): ?> |
|
| 78 | + <li><b class="fa fa-envelope-o"></b> <span><a href="mailto:<?php echo $model->{'email_'.$this->params[ 'shortLanguage' ]} ?>"> <?php echo $model->{'email_'.$this->params[ 'shortLanguage' ]} ?></a></span></li> |
|
| 79 | 79 | <?php endif; ?> |
| 80 | 80 | |
| 81 | 81 | <?php if (is_array($model->social)): ?> |
@@ -35,9 +35,12 @@ |
||
| 35 | 35 | <p>Because the application is in development mode, the email is not sent but saved as a file under <code><?php echo Yii::getAlias(Yii::$app->mailer->fileTransportPath) ?></code>. Please configure the <code>useFileTransport</code> property of the <code>mail</code> application component to be false to enable email sending.</p> |
| 36 | 36 | <?php endif; ?> |
| 37 | 37 | |
| 38 | - <?php else: ?> |
|
| 38 | + <?php else { |
|
| 39 | + : ?> |
|
| 39 | 40 | |
| 40 | - <?php $form = ActiveForm::begin(['id' => 'contact-form']); ?> |
|
| 41 | + <?php $form = ActiveForm::begin(['id' => 'contact-form']); |
|
| 42 | +} |
|
| 43 | +?> |
|
| 41 | 44 | |
| 42 | 45 | <?php echo $form->field($feedback, 'name')->textInput(['autofocus' => true])->label(Yii::t('feedback', 'Name')) ?> |
| 43 | 46 | |