Remove redundant code

This commit is contained in:
Damian Mooyman 2020-03-26 15:36:09 +13:00
parent 1ba72c74ce
commit 3fa3093d96
No known key found for this signature in database
GPG Key ID: 19B1752E86A700BB
1 changed files with 0 additions and 26 deletions

View File

@ -490,32 +490,6 @@ class BlogPost extends Page
}
}
/**
* {@inheritdoc}
*
* Sets blog relationship on all categories and tags assigned to this post.
*/
public function onAfterWrite()
{
parent::onAfterWrite();
foreach ($this->Categories() as $category) {
/**
* @var BlogCategory $category
*/
$category->BlogID = $this->ParentID;
$category->write();
}
foreach ($this->Tags() as $tag) {
/**
* @var BlogTag $tag
*/
$tag->BlogID = $this->ParentID;
$tag->write();
}
}
/**
* {@inheritdoc}
*/