public isAncestorNodeOf ( string $nodePathOrIdentifier ) : boolean | ||
$nodePathOrIdentifier | string | The identifier or absolute path of the node to match |
Результат | boolean | TRUE if the given node matches otherwise false |
public function isAncestorNodeOf($nodePathOrIdentifier)
{
$nodePath = $this->resolveNodePath($nodePathOrIdentifier);
if (is_bool($nodePath)) {
return $nodePath;
}
return substr($nodePath, 0, strlen($this->node->getPath())) === $this->node->getPath();
}