API docs     >     Content Blocks     >     CblockMgr

CblockMgr->getList

Description

getList ( $cbId = 0, $filter = array(), $maxLevel = 0, $permissionsForRoleId = 0, $filterArray )
Gets a list of Cblocks

Parameters

$cbId
int
(optional) Id of the parent Cblock from which the list will be created
$filter
array
(optional, may be combined) If SUBNODES, only subnodes of the specified Cblock will be returned
if PSUBNODES, only subnodes including the specified Cblock will be returned
if TRASHCAN, only items in the Trash will be returned
if PUBLISHED, only live/published versions will be returned
$maxLevel
int
(optional) Specifies the maximum level of nodes to get
$permissionsForRoleId
int
(optional) If '1' then return all Usergroups and Permissions for this node
$filterArray
array
Array of filters for the SQL query

Returns

array|false
Array of Cblocks or FALSE in case of an error
  1. Array(                                  array Array of n Contentblocks
  2.     [0] => Array(
  3.         [LFT] => 1                      int Id of the left node in the nested set tree structure
  4.         [RGT] => 458                    int Id of the right node in the nested set tree structure
  5.         [VERSIONPUBLISHED] => 999999    int Published version (either a specific version or 999999 if set to 'ALWAYS_LATEST_APPROVED_VERSION')
  6.         [ID] => 1                       int Id
  7.         [LEVEL] => 1                    int Level in tree
  8.         [PARENT] => 0                   int Parent Id
  9.         [PNAME] => 'Contentblocks'      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.         [OID] => 1                      int Id
  15.         [NAME] => 'Contentblocks'       string Name
  16.         [DESCRIPTION] => 'Cblock desc'  string Description (dynamic Property)
  17.         [CREATEDTS] => 0                int Timestamp of the creation
  18.         [CHANGEDTS] => 0                int Timestamp of the last change
  19.         [CREATEDBY] => 1                int Id of the User who created the Object
  20.         [CHANGEDBY] => 0                int Id of the last User who touched the Object
  21.         [RREAD] => 1                    int 1 if User owns Permissions to read this Object, 0 if not
  22.         [RWRITE] => 1                   int 1 if User owns Permissions to write this Object, 0 if not
  23.         [RDELETE] => 1                  int 1 if User owns Permissions to delete this Object, 0 if not
  24.         [RSUB] => 1                     int 1 if User owns Permissions to create subnodes under this Object, 0 if not
  25.         [RSTAGE] => 1                   int 1 if User owns Permissions to publish/approve this Object, 0 if not
  26.         [RMODERATE] => 1                int 1 if User owns Permissions to moderate Comments of this Object, 0 if not
  27.         [RCOMMENT] => 1                 int 1 if User owns Permissions to add Comments to this Object, 0 if not
  28.     )
  29.     ...
  30. )