Skip to content

Latest commit

 

History

History
34 lines (31 loc) · 1.1 KB

File metadata and controls

34 lines (31 loc) · 1.1 KB

FindNodeObject

FindNodeObject(currentNode, key): [class-node]

Look up [class-node] object by either name or object id, will return null if object not found or not accessible. This function search for nodes only.

If trusted node validation is enforced, currentNode should point to execution context object (instance of [class-netobj], $node in most cases). If trusted nodes are disabled (default server configuration), currentNode can be set to null.

Table 1. Parameters

currentNode

Lookup context or null if trusted nodes validation is disabled.

key

Object name of id.

Return

Instance of [class-node] object or null if not found or not accessible.

>>> FindNodeObject($node, "server.netxms.org")
object
>>> FindNodeObject(null, 12)
object
>>> FindNodeObject($node, "bad_node_name")
NULL