/**
* Matches if the selected node is a *descendant* of the given node specified by $nodePathOrIdentifier
*
* Example: isDescendantNodeOf('/sites/some/path') matches for the nodes "/sites/some/path", "/sites/some/path/subnode" but not for "/sites/some/other"
*
* @param string $nodePathOrIdentifier The identifier or absolute path of the node to match
* @return boolean TRUE if the given node matches otherwise false
*/
public function isDescendantNodeOf($nodePathOrIdentifier)
{
$nodePath = $this->resolveNodePath($nodePathOrIdentifier);
if (is_bool($nodePath)) {
return $nodePath;
}
return substr($this->node->getPath() . '/', 0, strlen($nodePath)) === $nodePath;
}