The exists() method checks whether the specified node exists in the NodeList.
Description
public NodeList::exists(NodeInterface $node): bool
Parameters
node
The node to check for existence in the NodeList.
Return Value
Returns true if the node exists in the NodeList, otherwise returns false.
Exceptions
None