mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
Merge pull request #21 from purplespider/beforeupdatecmsfields
Blog: Wrapped CMS fields in beforeUpdateCMSFields
This commit is contained in:
commit
fb85da54de
@ -33,7 +33,7 @@ class Blog extends Page {
|
||||
|
||||
|
||||
public function getCMSFields() {
|
||||
$fields = parent::getCMSFields();
|
||||
$this->beforeUpdateCMSFields(function($fields) {
|
||||
|
||||
$posts = $this->getBlogPosts();
|
||||
$excluded = $this->getExcludedSiteTreeClassNames();
|
||||
@ -72,6 +72,9 @@ class Blog extends Page {
|
||||
$tags
|
||||
));
|
||||
|
||||
});
|
||||
|
||||
$fields = parent::getCMSFields();
|
||||
return $fields;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user