CopyFactory::attachToMoreRelevantHasMany
Usage: an object has many children, the children have already been copied, but they are not pointing at the new parent object.
Signature
public function attachToMoreRelevantHasMany(DataObject
$copyFromParent,
DataObject
$newObjectParent,
String
$relationalFieldForChildren,
String
$relationFieldForParentWithoutID,
DataList
$dataListToChooseFrom )
Parameters
$copyFromParent
—
object
$newObjectParent
—
object
$relationalFieldForChildren
—
object
- - this is the field on the parent that provides the children (e.g. Children or Images) WITHOUT the ID part.
$relationFieldForParentWithoutID
—
object
- - this is the field on the children that links them back to the parent.
$dataListToChooseFrom
—
object
- - selection of children that are best matches ...
Returns
- CopyFactory