@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | public function registerNavigation() |
94 | 94 | { |
95 | 95 | // Extend the navigation |
96 | - Event::listen('backend.menu.extendItems', function ($manager) { |
|
96 | + Event::listen('backend.menu.extendItems', function($manager) { |
|
97 | 97 | $manager->addSideMenuItems(self::REQUIRED_PLUGIN_RAINLAB_BLOG, 'blog', [ |
98 | 98 | 'series' => [ |
99 | 99 | 'label' => self::LOCALIZATION_KEY . 'navigation.series', |
@@ -119,14 +119,14 @@ discard block |
||
119 | 119 | */ |
120 | 120 | private function extendModel() |
121 | 121 | { |
122 | - PostModel::extend(function ($model) { |
|
123 | - $model->belongsToMany['tags'] = [ |
|
122 | + PostModel::extend(function($model) { |
|
123 | + $model->belongsToMany[ 'tags' ] = [ |
|
124 | 124 | Tag::class, |
125 | 125 | 'table' => Tag::CROSS_REFERENCE_TABLE_NAME, |
126 | 126 | 'order' => 'name' |
127 | 127 | ]; |
128 | 128 | |
129 | - $model->belongsTo['series'] = [ |
|
129 | + $model->belongsTo[ 'series' ] = [ |
|
130 | 130 | Series::class, |
131 | 131 | 'key' => Series::TABLE_NAME . "_id" |
132 | 132 | ]; |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | */ |
139 | 139 | private function extendPostsController() |
140 | 140 | { |
141 | - PostsController::extendFormFields(function ($form, $model) { |
|
141 | + PostsController::extendFormFields(function($form, $model) { |
|
142 | 142 | if (!$model instanceof PostModel) { |
143 | 143 | return; |
144 | 144 | } |
@@ -157,13 +157,13 @@ discard block |
||
157 | 157 | $tab = self::LOCALIZATION_KEY . 'navigation.taxonomy'; |
158 | 158 | |
159 | 159 | $categoriesConfig = $form->getField('categories')->config; |
160 | - $categoriesConfig['tab'] = $tab; |
|
161 | - $categoriesConfig['mode'] = 'relation'; |
|
162 | - $categoriesConfig['type'] = 'taglist'; |
|
163 | - $categoriesConfig['label'] = 'rainlab.blog::lang.post.tab_categories'; |
|
164 | - $categoriesConfig['comment'] = "rainlab.blog::lang.post.categories_comment"; |
|
165 | - $categoriesConfig['placeholder'] = self::LOCALIZATION_KEY . 'placeholders.categories'; |
|
166 | - unset($categoriesConfig['commentAbove']); |
|
160 | + $categoriesConfig[ 'tab' ] = $tab; |
|
161 | + $categoriesConfig[ 'mode' ] = 'relation'; |
|
162 | + $categoriesConfig[ 'type' ] = 'taglist'; |
|
163 | + $categoriesConfig[ 'label' ] = 'rainlab.blog::lang.post.tab_categories'; |
|
164 | + $categoriesConfig[ 'comment' ] = "rainlab.blog::lang.post.categories_comment"; |
|
165 | + $categoriesConfig[ 'placeholder' ] = self::LOCALIZATION_KEY . 'placeholders.categories'; |
|
166 | + unset($categoriesConfig[ 'commentAbove' ]); |
|
167 | 167 | |
168 | 168 | $form->removeField('categories'); |
169 | 169 | |
@@ -194,8 +194,8 @@ discard block |
||
194 | 194 | */ |
195 | 195 | private function extendCategoriesController() |
196 | 196 | { |
197 | - CategoriesController::extend(function (Controller $controller) { |
|
198 | - $controller->implement[] = RelationController::class; |
|
197 | + CategoriesController::extend(function(Controller $controller) { |
|
198 | + $controller->implement[ ] = RelationController::class; |
|
199 | 199 | $relationConfig = '$/' . self::DIRECTORY_KEY . '/controllers/category/config_relation.yaml'; |
200 | 200 | |
201 | 201 | if (property_exists($controller, 'relationConfig')) { |