Merge pull request #4331 from jason-zz/patch-2

Add extension hook for getManyManyComponents()
This commit is contained in:
Will Morgan 2015-06-26 09:09:22 +01:00
commit 3ce51d15bf

View File

@ -1771,7 +1771,10 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity
$componentClass, $table, $componentField, $parentField,
$this->manyManyExtraFieldsForComponent($componentName)
);
if($this->model) $result->setDataModel($this->model);
$this->extend('updateManyManyComponents', $result);
// If this is called on a singleton, then we return an 'orphaned relation' that can have the
// foreignID set elsewhere.