/** * {@inheritDoc} * * @api */ public function move($srcAbsPath, $destAbsPath) { try { $parent = $this->objectManager->getNodeByPath(PathHelper::getParentPath($destAbsPath)); } catch (ItemNotFoundException $e) { throw new PathNotFoundException("Target path can not be found: {$destAbsPath}", $e->getCode(), $e); } if ($parent->hasNode(PathHelper::getNodeName($destAbsPath))) { // TODO same-name siblings throw new ItemExistsException('Target node already exists at ' . $destAbsPath); } if ($parent->hasProperty(PathHelper::getNodeName($destAbsPath))) { throw new ItemExistsException('Target property already exists at ' . $destAbsPath); } $this->objectManager->moveNode($srcAbsPath, $destAbsPath); }