Add extension hook for getManyManyComponents()

Call extension after DataModel is set
This commit is contained in:
Jason 2015-06-22 12:39:40 +10:00 committed by Jason Zhang
parent 04f96da453
commit b5f88af1f0

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.