API docs     >     Mailings     >     MailingMgr

MailingMgr->getTree

Description

getTree ( $mailingId = NULL, $maxLevels = 2 )
Get Mailing tree nodes

Parameters

$mailingId
int
(optional) From which Mailing Id the tree should be returned
$maxLevels
int
(optional) Specifies the maximum level of nodes to get

Returns

array
Array of Mailing nodes
  1. Array(                                          array  Array of n Mailings
  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] => 4                              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.         [TITLE] => ''                           string Title
  8.         [LEVEL] => 1                            int Level in tree
  9.         [PARENT] => 0                           int Parent Id
  10.         [PNAME] => 'mailings'                   string Permanent name
  11.         [VERSION] => 0                          int Version
  12.         [HASCHANGED] => 0                       int 1 if changed since last approval, 0 if not
  13.         [NAME] => 'Mailings'                    string Name
  14.         [ACTIVE] => 1                           int 1 if active, 0 if inactive
  15.         [TEMPLATEID] => 1                       int Template Id
  16.         [RREAD] => 1                            int 1 if User owns Permissions to read this Object, 0 if not
  17.         [RWRITE] => 1                           int 1 if User owns Permissions to write this Object, 0 if not
  18.         [RDELETE] => 1                          int 1 if User owns Permissions to delete this Object, 0 if not
  19.         [RSUB] => 1                             int 1 if User owns Permissions to create subnodes under this Object, 0 if not
  20.         [RSTAGE] => 1                           int 1 if User owns Permissions to publish/approve this Object, 0 if not
  21.         [RMODERATE] => 0                        int 1 if User owns Permissions to moderate Comments of this Object, 0 if not
  22.         [RCOMMENT] => 0                         int 1 if User owns Permissions to add Comments to this Object, 0 if not
  23.     )
  24.     ...
  25. )