API docs     >     Content Blocks     >     CblockMgr

CblockMgr->getTree

Description

getTree ( $cbId = NULL, $maxLevels = 2, $onlyFolders = false, $skipNode = NULL, $noTrash = true )
Get Cblock tree nodes

Parameters

$cbId
int
(optional) From which Cblock Id the tree should be returned
$maxLevels
int
(optional) Specifies the maximum level of nodes to get
$onlyFolders
bool
(optional) FALSE when item from the Trash should also be returned
$skipNode
int
(optional) Specifies a node to be skipped (should be used to skip the embedded Content Block folder)
$noTrash
bool
(optional) FALSE when item from the Trash should also be returned

Returns

array
Array of Page nodes
  1. Array(                                  array Array of n Contentblocks
  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] => 458                    int Id of the right node in the nested set tree structure
  6.         [VERSIONPUBLISHED] => 999999    int Published version (either a specific version or 999999 if set to 'ALWAYS_LATEST_APPROVED_VERSION')
  7.         [LEVEL] => 1                    int Level in tree
  8.         [PARENT] => 0                   int Parent Id
  9.         [PNAME] => 'cblockpname'        string Permanent name
  10.         [VERSION] => 1                  int Version
  11.         [FOLDER] => 1                   int 1 if folder, 0 if not
  12.         [HASCHANGED] => 0               int 1 if changed since last approval, 0 if not
  13.         [EMBEDDED] => 1                 int 1 if embedded Contentblock, 0 if not
  14.         [NAME] => 'Contentblock name'   string Name
  15.         [RREAD] => 1                    int 1 if User owns Permissions to read this Object, 0 if not
  16.         [RWRITE] => 1                   int 1 if User owns Permissions to write this Object, 0 if not
  17.         [RDELETE] => 1                  int 1 if User owns Permissions to delete this Object, 0 if not
  18.         [RSUB] => 1                     int 1 if User owns Permissions to create subnodes under this Object, 0 if not
  19.         [RSTAGE] => 1                   int 1 if User owns Permissions to publish/approve this Object, 0 if not
  20.         [RMODERATE] => 1                int 1 if User owns Permissions to moderate Comments of this Object, 0 if not
  21.         [RCOMMENT] => 1                 int 1 if User owns Permissions to add Comments to this Object, 0 if not
  22.     )
  23.     ...
  24. )