public isDescendantNodeOf ( 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 isDescendantNodeOf($nodePathOrIdentifier)
{
$nodePath = $this->resolveNodePath($nodePathOrIdentifier);
if (is_bool($nodePath)) {
return $nodePath;
}
return substr($this->node->getPath() . '/', 0, strlen($nodePath)) === $nodePath;
}