The moveAfterSibling()
method moves the target node after the specified sibling node in the parent NodeList
.
If the specified sibling node is not a valid sibling of the target node, the method throws an exception.
Description
public AbstractNode::moveAfterSibling(NodeInterface $siblingNode): ?NodeInterface
Parameters
siblingNode
The sibling node after which the target node will be moved.
Return Value
Returns a NodeInterface
representing the sibling that the target node was moved after.
Exceptions
HIERARCHY_REQUEST_ERR
Thrown if the sibling is not a child of the target's parent