CopyFactory::copyHasManyRelation
Usage: an object has many children and we want to also copy the children and add them to the copied into parent ...
Signature
public function copyHasManyRelation(DataObject
$copyFromParent,
DataObject
$newObjectParent,
String
$relationalFieldForChildren,
String
$relationFieldForParentWithoutID )
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.
Returns
- CopyFactory