@@ -26,10 +26,10 @@ |
||
| 26 | 26 | return [ |
| 27 | 27 | 'vars' => [ |
| 28 | 28 | ['var' => 'lineSpace', 'label' => Module::t('block_line_linespace_label'), 'type' => 'zaa-select', 'options' => [ |
| 29 | - ['value' => '5px', 'label' => '5px ' . Module::t('block_line_linespace_space')], |
|
| 30 | - ['value' => '10px', 'label' => '10px ' . Module::t('block_line_linespace_space')], |
|
| 31 | - ['value' => '20px', 'label' => '20px ' . Module::t('block_line_linespace_space')], |
|
| 32 | - ['value' => '30px', 'label' => '30px ' . Module::t('block_line_linespace_space')], |
|
| 29 | + ['value' => '5px', 'label' => '5px '.Module::t('block_line_linespace_space')], |
|
| 30 | + ['value' => '10px', 'label' => '10px '.Module::t('block_line_linespace_space')], |
|
| 31 | + ['value' => '20px', 'label' => '20px '.Module::t('block_line_linespace_space')], |
|
| 32 | + ['value' => '30px', 'label' => '30px '.Module::t('block_line_linespace_space')], |
|
| 33 | 33 | ], 'initvalue' => '5px'], |
| 34 | 34 | ['var' => 'lineStyle', 'label' => Module::t('block_line_linestyle_label'), 'type' => 'zaa-select', 'options' => [ |
| 35 | 35 | ['value' => 'dotted', 'label' => Module::t('block_line_linestyle_dotted')], |
@@ -36,6 +36,6 @@ |
||
| 36 | 36 | |
| 37 | 37 | public function twigAdmin() |
| 38 | 38 | { |
| 39 | - return '{% if vars.content is not empty %}<blockquote>{{ vars.content }}</blockquote>{% else %}<span class="block__empty-text">' . Module::t('block_quote_no_content') . '</span>{% endif %}'; |
|
| 39 | + return '{% if vars.content is not empty %}<blockquote>{{ vars.content }}</blockquote>{% else %}<span class="block__empty-text">'.Module::t('block_quote_no_content').'</span>{% endif %}'; |
|
| 40 | 40 | } |
| 41 | 41 | } |
@@ -48,6 +48,6 @@ |
||
| 48 | 48 | |
| 49 | 49 | public function twigAdmin() |
| 50 | 50 | { |
| 51 | - return '{% if vars.elements is empty%}<span class="block__empty-text">' . Module::t('block_list_no_content') . '</span>{% else %}<{{ extras.listType }}>{% for row in vars.elements if row.value is not empty %}<li>{{ row.value }}</li>{% endfor %}</{{ extras.listType }}>{% endif %}'; |
|
| 51 | + return '{% if vars.elements is empty%}<span class="block__empty-text">'.Module::t('block_list_no_content').'</span>{% else %}<{{ extras.listType }}>{% for row in vars.elements if row.value is not empty %}<li>{{ row.value }}</li>{% endfor %}</{{ extras.listType }}>{% endif %}'; |
|
| 52 | 52 | } |
| 53 | 53 | } |
@@ -6,7 +6,7 @@ discard block |
||
| 6 | 6 | { |
| 7 | 7 | public function up() |
| 8 | 8 | { |
| 9 | - $this->createTable('cms_cat', [ // renameed to cms_nav_container |
|
| 9 | + $this->createTable('cms_cat', [// renameed to cms_nav_container |
|
| 10 | 10 | 'id' => 'pk', |
| 11 | 11 | 'name' => 'VARCHAR(180) NOT NULL', |
| 12 | 12 | 'rewrite' => 'VARCHAR(80) NOT NULL', // renamed to alias |
@@ -15,7 +15,7 @@ discard block |
||
| 15 | 15 | 'is_deleted' => 'TINYINT(1) NOT NULL default 0', |
| 16 | 16 | ]); |
| 17 | 17 | |
| 18 | - $this->insert('cms_cat', [ // renamed to cms_nav_container |
|
| 18 | + $this->insert('cms_cat', [// renamed to cms_nav_container |
|
| 19 | 19 | 'name' => 'Default Container', |
| 20 | 20 | 'rewrite' => 'default', // renmaed to alias |
| 21 | 21 | 'default_nav_id' => 1, |
@@ -413,7 +413,7 @@ |
||
| 413 | 413 | if ($parentNavId != 0) { |
| 414 | 414 | $node = NavItem::find()->where(['nav_id' => $parentNavId])->one(); |
| 415 | 415 | if ($parentNavId) { |
| 416 | - $data = $node->title . '/' . $data; |
|
| 416 | + $data = $node->title.'/'.$data; |
|
| 417 | 417 | } |
| 418 | 418 | } |
| 419 | 419 | } |
@@ -120,13 +120,13 @@ discard block |
||
| 120 | 120 | |
| 121 | 121 | switch ($e->name) { |
| 122 | 122 | case 'afterInsert': |
| 123 | - Log::add(1, "nav.insert, cms_nav.id '" . $this->id . "'", $this->toArray()); |
|
| 123 | + Log::add(1, "nav.insert, cms_nav.id '".$this->id."'", $this->toArray()); |
|
| 124 | 124 | break; |
| 125 | 125 | case 'afterUpdate': |
| 126 | - Log::add(2, "nav.update, cms_nav.id '" . $this->id . "'", $this->toArray()); |
|
| 126 | + Log::add(2, "nav.update, cms_nav.id '".$this->id."'", $this->toArray()); |
|
| 127 | 127 | break; |
| 128 | 128 | case 'afterDelete': |
| 129 | - Log::add(3, "nav.delete, cms_nav.id '" . $this->id . "'", $this->toArray()); |
|
| 129 | + Log::add(3, "nav.delete, cms_nav.id '".$this->id."'", $this->toArray()); |
|
| 130 | 130 | break; |
| 131 | 131 | } |
| 132 | 132 | } |
@@ -227,7 +227,7 @@ discard block |
||
| 227 | 227 | |
| 228 | 228 | public function moveUpstairs() |
| 229 | 229 | { |
| 230 | - $startIndex = (int)$this->sort_index; |
|
| 230 | + $startIndex = (int) $this->sort_index; |
|
| 231 | 231 | foreach (self::find()->where('sort_index >= :index', ['index' => $startIndex])->andWhere(['nav_container_id' => $this->nav_container_id, 'parent_nav_id' => $this->parent_nav_id])->orderBy('sort_index ASC')->asArray()->all() as $item) { |
| 232 | 232 | ++$startIndex; |
| 233 | 233 | Yii::$app->db->createCommand()->update(self::tableName(), ['sort_index' => $startIndex], 'id=:id', ['id' => $item['id']])->execute(); |
@@ -236,7 +236,7 @@ discard block |
||
| 236 | 236 | |
| 237 | 237 | public function moveDownstairs() |
| 238 | 238 | { |
| 239 | - $startIndex = (int)$this->sort_index; |
|
| 239 | + $startIndex = (int) $this->sort_index; |
|
| 240 | 240 | foreach (self::find()->where('sort_index >= :index', ['index' => $startIndex])->andWhere(['nav_container_id' => $this->nav_container_id, 'parent_nav_id' => $this->parent_nav_id])->orderBy('sort_index ASC')->asArray()->all() as $item) { |
| 241 | 241 | --$startIndex; |
| 242 | 242 | Yii::$app->db->createCommand()->update(self::tableName(), ['sort_index' => $startIndex], 'id=:id', ['id' => $item['id']])->execute(); |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | return $data; |
| 77 | 77 | } |
| 78 | 78 | |
| 79 | - throw new Exception("Could not find the requested cms layout id '".$this->layout_id."' for nav item page id '". $this->id . "'. Make sure your page does not have an old inactive/deleted cms layout selected."); |
|
| 79 | + throw new Exception("Could not find the requested cms layout id '".$this->layout_id."' for nav item page id '".$this->id."'. Make sure your page does not have an old inactive/deleted cms layout selected."); |
|
| 80 | 80 | } |
| 81 | 81 | |
| 82 | 82 | private function setHasCache($key, $value, $expirationTime) |
@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | } |
| 145 | 145 | } |
| 146 | 146 | |
| 147 | - $string.= $blockResponse; |
|
| 147 | + $string .= $blockResponse; |
|
| 148 | 148 | } |
| 149 | 149 | |
| 150 | 150 | return $string; |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | public function getHttpPath() |
| 111 | 111 | { |
| 112 | 112 | if ($this->_httpPath === null) { |
| 113 | - $this->_httpPath = $this->request->baseUrl . '/storage'; |
|
| 113 | + $this->_httpPath = $this->request->baseUrl.'/storage'; |
|
| 114 | 114 | } |
| 115 | 115 | |
| 116 | 116 | return $this->_httpPath; |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | public function getServerPath() |
| 124 | 124 | { |
| 125 | 125 | if ($this->_serverPath === null) { |
| 126 | - $this->_serverPath = Yii::getAlias('@webroot') . '/storage'; |
|
| 126 | + $this->_serverPath = Yii::getAlias('@webroot').'/storage'; |
|
| 127 | 127 | } |
| 128 | 128 | |
| 129 | 129 | return $this->_serverPath; |
@@ -230,7 +230,7 @@ discard block |
||
| 230 | 230 | |
| 231 | 231 | $newName = implode([$baseName.'_'.$fileHashName, $fileInfo->extension], '.'); |
| 232 | 232 | |
| 233 | - $savePath = $this->serverPath . '/' . $newName; |
|
| 233 | + $savePath = $this->serverPath.'/'.$newName; |
|
| 234 | 234 | |
| 235 | 235 | if (is_uploaded_file($fileSource)) { |
| 236 | 236 | if (!@move_uploaded_file($fileSource, $savePath)) { |
@@ -322,7 +322,7 @@ discard block |
||
| 322 | 322 | $image = $imagine->open($fileQuery->serverSource); |
| 323 | 323 | |
| 324 | 324 | $fileName = $filterId.'_'.$fileQuery->systemFileName; |
| 325 | - $fileSavePath = $this->serverPath . '/' . $fileName; |
|
| 325 | + $fileSavePath = $this->serverPath.'/'.$fileName; |
|
| 326 | 326 | if (empty($filterId)) { |
| 327 | 327 | $save = $image->save($fileSavePath); |
| 328 | 328 | } else { |
@@ -73,7 +73,7 @@ |
||
| 73 | 73 | |
| 74 | 74 | // see if the groups has items |
| 75 | 75 | foreach ($item['groups'] as $groupName => $groupItem) { |
| 76 | - if (count($groupItem['items']) > 0) { |
|
| 76 | + if (count($groupItem['items']) > 0) { |
|
| 77 | 77 | if ($permissionGranted) { |
| 78 | 78 | continue; |
| 79 | 79 | } |