API docs     >     General     >     Tags

Tags->getTree

Description

getTree ( $tagId = NULL, $maxLevels = 2 )
Gets Tag tree nodes

Parameters

$tagId
int
(optional) Id of the parent Tag from which the tree should be returned
$maxLevels
int
(optional) Specifies the maximum level of nodes to get

Returns

array
Array of Tag nodes
  1. Array(                              array Array of n Tags
  2.     [0] => Array(
  3.         [ID] => 1                   int Id
  4.         [LFT] => 1                  int Id of the left node in the nested set tree structure
  5.         [RGT] => 10                 int Id of the right node in the nested set tree structure
  6.         [VERSIONPUBLISHED] => 0     int Published version (either a specific version or 999999 if set to 'ALWAYS_LATEST_APPROVED_VERSION')
  7.         [TITLE] => ''               string Title
  8.         [LEVEL] => 1                int Level in tree
  9.         [PARENT] => 0               int Parent Id
  10.         [PNAME] => 'tags'           string Permanent name
  11.         [NAME] => 'Tags'            string Name
  12.         [RREAD] => 1                int 1 if User owns Permissions to read this Object, 0 if not
  13.         [RWRITE] => 1               int 1 if User owns Permissions to write this Object, 0 if not
  14.         [RDELETE] => 1              int 1 if User owns Permissions to delete this Object, 0 if not
  15.         [RSUB] => 1                 int 1 if User owns Permissions to create subnodes under this Object, 0 if not
  16.         [RSTAGE] => 1               int 1 if User owns Permissions to publish/approve this Object, 0 if not
  17.         [RMODERATE] => 0            int 1 if User owns Permissions to moderate Comments of this Object, 0 if not
  18.         [RCOMMENT] => 0             int 1 if User owns Permissions to add Comments to this Object, 0 if not
  19.     )
  20.     ...
  21. )