public final function detach() { $this->checkParentRelation($this->parentNode); $this->parentNode->children()->remove($this); return $this; }
private function checkUnlocked(ChildNodeInterface $child) { if ($child->isLocked()) { throw new LockedNodeException(); } }