Merge pull request #621 from wernerkrauss/fix-619

FIX forward IDs given by DataList::relation()
This commit is contained in:
Serge Latyntsev 2020-09-08 08:15:53 +12:00 committed by GitHub
commit fc51e77af3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -20,11 +20,12 @@ use SilverStripe\View\Parsers\URLSegmentFilter;
trait BlogObject
{
/**
* @param int|array|null $id Optional ID(s) for parent of this relation, if not the current record
* @return DataList
*/
public function BlogPosts()
public function BlogPosts($id = null)
{
$blogPosts = parent::BlogPosts();
$blogPosts = parent::BlogPosts($id);
$this->extend('updateGetBlogPosts', $blogPosts);