You have been redirected from an outdated version of the article. Below is the content available on this topic. To view the old article click here.

get_relationship_types()

Usage

get_relationship_types(node[, lookupType [, direction ]])

Parameters

  • node: The node for which possible relationship types should be checked
  • lookupType: Either existing (default) or schema
  • direction: Either incoming, outgoing or both (default)

Description

Returns the list of available relationship types form and/or to this node. Either potentially available (as defined in the schema) or actually available (existing relationships in the database).

Example

${get_relationship_types(me, 'schema')}
${get_relationship_types(me, 'schema', 'incoming')}
${get_relationship_types(me, 'schema', 'outgoing')}

${get_relationship_types(me, 'existing')}
${get_relationship_types(me, 'existing', 'incoming')}
${get_relationship_types(me, 'existing', 'outgoing')}

results in

[HOME_DIR, WORKING_DIR, OWNS, SECURITY, PICTURE_OF, FAVORITE, CONTAINS]
[OWNS, SECURITY, PICTURE_OF, CONTAINS]
[HOME_DIR, WORKING_DIR, OWNS, SECURITY, FAVORITE]

[OWNS, SECURITY, CONTAINS]    (user owns nodes, has permissions on nodes and is contained in a group)
[OWNS, SECURITY]              (user owns nodes and has permissions on nodes)
[CONTAINS]                    (user is contained in a group)

Search results for "get_relationship_types()"

get_relationship_types()

Returns the list of available relationship types form and/or to this node. Either potentially available (as defined in the schema) or actually available (existing relationships in the database).

get_relationship_types(node [, lookupType = 'existing' [, direction = 'both' ]])