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