@@ 41-51 (lines=11) @@ | ||
38 | */ |
|
39 | public function updateCMSFields(FieldList $fields) |
|
40 | { |
|
41 | if (Config::inst()->get("BlogPostSharedCategoriesExtension", "categories_checkboxes") == true) { |
|
42 | $fields->replaceField( |
|
43 | "Categories", |
|
44 | CheckboxSetField::create( |
|
45 | 'Categories', |
|
46 | _t('BlogPost.Categories', 'Categories'), |
|
47 | BlogCategory::get()->sort(array('Title'=>'ASC'))->map("ID", "Title"), |
|
48 | $this->owner->Categories() |
|
49 | ) |
|
50 | ); |
|
51 | } |
|
52 | if (Config::inst()->get("BlogPostSharedCategoriesExtension", "tags_checkboxes") == true) { |
|
53 | $fields->replaceField( |
|
54 | "Tags", |
|
@@ 52-62 (lines=11) @@ | ||
49 | ) |
|
50 | ); |
|
51 | } |
|
52 | if (Config::inst()->get("BlogPostSharedCategoriesExtension", "tags_checkboxes") == true) { |
|
53 | $fields->replaceField( |
|
54 | "Tags", |
|
55 | CheckboxSetField::create( |
|
56 | 'Tags', |
|
57 | _t('BlogPost.Tags', 'Tags'), |
|
58 | BlogTag::get()->sort(array('Title'=>'ASC'))->map("ID", "Title"), |
|
59 | $this->owner->Tags() |
|
60 | ) |
|
61 | ); |
|
62 | } |
|
63 | return $fields; |
|
64 | } |
|
65 | } |