API docs     >     Files     >     FileMgr

FileMgr->getList

Description

getList ( $fileId = 0, $filter = array(), $sort = 'group2.LFT', $maxLevel = 0, $usergroupId = 0, $filterArray )
Gets a list of Files

Parameters

$fileId
int
(optional) Id of the parent File from which the list will be created
$filter
array
(optional, may be combined) If SUBNODES, only subnodes of the specified File will be returned
if TRASHCAN, only items in the Trash will be returned
if FOLDERS, only folders will be returned
$sort
string
(optional) "ORDER BY" Sql clause
$maxLevel
int
(optional) Specifies the maximum level of nodes to get
$usergroupId
int
(optional) Return List for a specfic Usergroup Id
$filterArray
array
Array of filters for the SQL query

Returns

array|false
Array of Files or FALSE in case of an error
  1. Array(
  2.     [0] => Array(                           array Array of n Files
  3.         [LFT] => 1                          int Id of the left node in the nested set tree structure
  4.         [RGT] => 162                        int Id of the right node in the nested set tree structure
  5.         [VERSIONPUBLISHED] => 0             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.         [VERSION] => 0                      int Version
  10.         [FOLDER] => 1                       int 1 if folder, 0 if not
  11.         [FILENAME] => 'file.jpg'            string Filename
  12.         [FILETYPE] => 8                     int Type
  13.         [FILESIZE] => 0                     int Size
  14.         [EXTENSION] => 'JPG'                string File extension
  15.         [OID] => 1                          int Id
  16.         [NAME] => 'File'                    string Name
  17.         [DESCRIPTION] => 'File desc'        string Description (dynamic Property)
  18.         [CREATEDTS] => 0                    int Timestamp of the creation
  19.         [CHANGEDTS] => 0                    int Timestamp of the last change
  20.         [CREATEDBY] => 0                    int Id of the User who created the Object
  21.         [CHANGEDBY] => 0                    int Id of the last User who touched the Object
  22.         [RREAD] => 1                        int 1 if User owns Permissions to read this Object, 0 if not
  23.         [RWRITE] => 1                       int 1 if User owns Permissions to write this Object, 0 if not
  24.         [RDELETE] => 1                      int 1 if User owns Permissions to delete this Object, 0 if not
  25.         [RSUB] => 1                         int 1 if User owns Permissions to create subnodes under this Object, 0 if not
  26.         [RSTAGE] => 1                       int 1 if User owns Permissions to publish/approve this Object, 0 if not
  27.         [RMODERATE] => 1                    int 1 if User owns Permissions to moderate Comments of this Object, 0 if not
  28.         [RCOMMENT] => 1                     int 1 if User owns Permissions to add Comments to this Object, 0 if not
  29.     )
  30.     ...
  31. )