77 $this->result->setData([]);
80 foreach ($containerCollection as $container)
88 $fields = $this->
getFields($container, $entityId);
92 $result = $this->addToResultByName(
$result, [$entityId =>
false], $this->implementerName);
100 $copiedEntityId = $this->
addEntity($container, $fields);
101 if (!$copiedEntityId)
103 $result = $this->addToResultByName(
$result, [$entityId =>
false], $this->implementerName);
104 $this->result->addErrors($this->implementer->getErrors());
108 $copyChildrenResult = $this->
copyChildren($container, $entityId, $copiedEntityId);
109 if ($copyChildrenResult->getErrors())
111 $this->result->addErrors($copyChildrenResult->getErrors());
113 $result = $this->addToResult(
$result, $copyChildrenResult->getData());
115 $result = $this->addToResultByName(
$result, [$entityId => $copiedEntityId], $this->implementerName);
127 $this->result->setData(
$result);