@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | public function registerNavigation() |
105 | 105 | { |
106 | 106 | // Extend the navigation |
107 | - Event::listen('backend.menu.extendItems', function ($manager) { |
|
107 | + Event::listen('backend.menu.extendItems', function($manager) { |
|
108 | 108 | $manager->addSideMenuItems(self::REQUIRED_PLUGIN_RAINLAB_BLOG, 'blog', [ |
109 | 109 | 'series' => [ |
110 | 110 | 'label' => self::LOCALIZATION_KEY . 'navigation.series', |
@@ -130,12 +130,12 @@ discard block |
||
130 | 130 | */ |
131 | 131 | private function extendModel() |
132 | 132 | { |
133 | - PostModel::extend(function ($model) { |
|
133 | + PostModel::extend(function($model) { |
|
134 | 134 | $model->morphToMany = [ |
135 | - 'tags' => [Tag::class, 'name' => Tag::PIVOT_COLUMN] |
|
135 | + 'tags' => [ Tag::class, 'name' => Tag::PIVOT_COLUMN ] |
|
136 | 136 | ]; |
137 | 137 | |
138 | - $model->belongsTo['series'] = [ |
|
138 | + $model->belongsTo[ 'series' ] = [ |
|
139 | 139 | Series::class, |
140 | 140 | 'key' => Series::TABLE_NAME . "_id" |
141 | 141 | ]; |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | */ |
148 | 148 | private function extendPostsController() |
149 | 149 | { |
150 | - PostsController::extendFormFields(function ($form, $model) { |
|
150 | + PostsController::extendFormFields(function($form, $model) { |
|
151 | 151 | if (!$model instanceof PostModel) { |
152 | 152 | return; |
153 | 153 | } |
@@ -166,13 +166,13 @@ discard block |
||
166 | 166 | $tab = self::LOCALIZATION_KEY . 'navigation.taxonomy'; |
167 | 167 | |
168 | 168 | $categoriesConfig = $form->getField('categories')->config; |
169 | - $categoriesConfig['tab'] = $tab; |
|
170 | - $categoriesConfig['mode'] = 'relation'; |
|
171 | - $categoriesConfig['type'] = 'taglist'; |
|
172 | - $categoriesConfig['label'] = 'rainlab.blog::lang.post.tab_categories'; |
|
173 | - $categoriesConfig['comment'] = "rainlab.blog::lang.post.categories_comment"; |
|
174 | - $categoriesConfig['placeholder'] = self::LOCALIZATION_KEY . 'placeholders.categories'; |
|
175 | - unset($categoriesConfig['commentAbove']); |
|
169 | + $categoriesConfig[ 'tab' ] = $tab; |
|
170 | + $categoriesConfig[ 'mode' ] = 'relation'; |
|
171 | + $categoriesConfig[ 'type' ] = 'taglist'; |
|
172 | + $categoriesConfig[ 'label' ] = 'rainlab.blog::lang.post.tab_categories'; |
|
173 | + $categoriesConfig[ 'comment' ] = "rainlab.blog::lang.post.categories_comment"; |
|
174 | + $categoriesConfig[ 'placeholder' ] = self::LOCALIZATION_KEY . 'placeholders.categories'; |
|
175 | + unset($categoriesConfig[ 'commentAbove' ]); |
|
176 | 176 | |
177 | 177 | $form->removeField('categories'); |
178 | 178 | |
@@ -206,8 +206,8 @@ discard block |
||
206 | 206 | */ |
207 | 207 | private function extendCategoriesController() |
208 | 208 | { |
209 | - CategoriesController::extend(function (Controller $controller) { |
|
210 | - $controller->implement[] = RelationController::class; |
|
209 | + CategoriesController::extend(function(Controller $controller) { |
|
210 | + $controller->implement[ ] = RelationController::class; |
|
211 | 211 | $relationConfig = '$/' . self::DIRECTORY_KEY . '/controllers/category/config_relation.yaml'; |
212 | 212 | |
213 | 213 | if (property_exists($controller, 'relationConfig')) { |