contenido\classes\class.cms_filelist.php
Description: Class for handling CMS Type File List
Requirements:
- Author
- Dominik Ziegler, Timo Trautmann
- Con_php_req
- 5.0
- Copyright
- four for business AG
- License
- http://www.contenido.org/license/LIZENZ.txt
- Link
- http://www.4fb.de
- Link
- http://www.contenido.org
- Package
- Contenido Content Types
- Since
- file available since contenido release 4.8.13 {@internal created 2009-10-01 modified 2010-10-29, Dominik Ziegler - fixed CON-362 (removed whitespace from client setting) $Id$: }}
- Version
- 1.0.0
\Cms_FileList
All properties of the file list are stored as a xml document in the database.
Properties


array $aCfgClient = array()
array()
Details- Type
- array
- Access
- private


array $aDateFields = array()
array()
Details- Type
- array
- Access
- private


array $aFileExtensions = array()
array()
Details- Type
- array
- Access
- private


array $aFileListData = array()
array()
Details- Type
- array
- Access
- private


array $aMetaDataIdents = array()
array()
Details- Type
- array
- Access
- private


array $aSettings = array()
array()
Details- Type
- array
- Access
- private


array $aTranslations = array("LABEL_FILESIZE" => "Dateigröße", "LABEL_UPLOAD_DATE" => "Hochgeladen am")
Important: This must be a static array!
array("LABEL_FILESIZE" => "Dateigröße", "LABEL_UPLOAD_DATE" => "Hochgeladen am")
Details- Type
- array
- Access
- private


integer $iId = 0
0
Details- Type
- integer
- Access
- private


integer $iIdArtLang = 0
0
Details- Type
- integer
- Access
- private


string $sContent = ""
""
Details- Type
- string
- Access
- private
Methods


__construct(string $sContent, integer $iNumberOfCms, integer $iIdArtLang, array $sEditLink, array $aCfg, array $oDB, string $sContenidoLang, integer $iClient, integer $iLang, array $aCfgClient, object $oSess) : void
Constructor of class inits some important class variables and gets some Contenido global vars, so this class has no need to use ugly and buggy global commands
Name | Type | Description |
---|---|---|
$sContent | string |
|
$iNumberOfCms | integer |
|
$iIdArtLang | integer |
|
$sEditLink | array |
|
$aCfg | array |
|
$oDB | array |
|
$sContenidoLang | string |
|
$iClient | integer |
|
$iLang | integer |
|
$aCfgClient | array |
|
$oSess | object |
|
- Access
- public


addModuleTranslations(array $aTranslationStrings) : array
Returns all translation strings for mi18n.
Name | Type | Description |
---|---|---|
$aTranslationStrings | array | Array with translation strings |
Type | Description |
---|---|
array | Translation strings |


applyFileFilters(array $aFileList) : array
Executes the file filters which removes all files not matching the filter criterias.
Name | Type | Description |
---|---|---|
$aFileList | array | array with files to check |
Type | Description |
---|---|
array | array with filtered files |


buildDirectoryList(string $sUploadPath = "") : array
Builds a directory list by a given upload directory path.
Name | Type | Description |
---|---|---|
$sUploadPath | string | Path to directory (per default the root upload path of client) |
Type | Description |
---|---|
array | Array with directory information |


encodeForOutput(string $sCode) : string
In Contenido content type code is evaled by php.
To make this possible, this function prepares code for evaluation
Name | Type | Description |
---|---|---|
$sCode | string | code to escape |
Type | Description |
---|---|
string | escaped code |
- Access
- private


fillFileListTemplateEntry(array $aFileData, object $oTpl) : void
Method to fill single entry (file) of the file list.
Name | Type | Description |
---|---|---|
$aFileData | array | Array with information about the file |
$oTpl | object | Reference of the used template object |
- Access
- private


getAllWidgetEdit() : string
Function is called in editmode of contenido an returns filelist view and editbutton
Type | Description |
---|---|
string | code for the backend edit view |


getAllWidgetOutput() : string
Function is called in edit- and viewmode in order to generate code for output.
Type | Description |
---|---|
string | generated code |


getAllWidgetView() : string
Dynamic filelist generator.
This method is executed every time the filelist is displayed.
Type | Description |
---|---|
string | output of the filelist |


getDirectoryList(array $aDirs) : string
Returns the directory list of an given directory array (by buildDirectoryList()).
Name | Type | Description |
---|---|---|
$aDirs | array | Array with directory information |
Type | Description |
---|---|
string | html of the directory list |


getExistingFileSelect() : string
Function which generate a select box for existing files in the manual filelist.
Type | Description |
---|---|
string | rendered cHTMLSelectElement |


getExtensionSelect(array $aSelected) : string
Function which generate a select box for the filelist extensions.
Name | Type | Description |
---|---|---|
$aSelected | array | array with values which are selected |
Type | Description |
---|---|
string | rendered cHTMLSelectElement |
- Access
- private


getFileSelect(array $sDirectoryPath = "") : string
Function which generate a select box for the manual files.
Name | Type | Description |
---|---|---|
$sDirectoryPath | array | Path to directory of the files |
Type | Description |
---|---|
string | rendered cHTMLSelectElement |


getSortOrderSelect(string $sSelected) : string
Function which generate a select box for the filelist sort order.
Name | Type | Description |
---|---|---|
$sSelected | string | value of select box which is selected |
Type | Description |
---|---|
string | rendered cHTMLSelectElement |
- Access
- private


getSortSelect(string $sSelected) : string
Function which generate a select box for the filelist sort.
Name | Type | Description |
---|---|---|
$sSelected | string | value of select box which is selected |
Type | Description |
---|---|
string | rendered cHTMLSelectElement |
- Access
- private


getStyleSelect(string $sSelected) : string
Function which generate a select box for setting filelist style.
Name | Type | Description |
---|---|---|
$sSelected | string | value of select box which is selected |
Type | Description |
---|---|
string | rendered cHTMLSelectElement |
- Access
- private


performFileDateFilters(array $aFileStats) : boolean
Performs all date filters of a file.
Name | Type | Description |
---|---|---|
$aFileStats | array | Array with file information |
Type | Description |
---|---|
boolean | check state (true = tests passed, false = tests not passed) |


readSettings() : void
Function parses XML document which contains file list settings and store properties as array into $aSettings
- Access
- private


recursiveCheckForSubdirectories(string $sDirectoryPath, array $aDirectories) : array
Checks recursively for sub directories
Name | Type | Description |
---|---|---|
$sDirectoryPath | string | Path to directory |
$aDirectories | array | Directory array |
Type | Description |
---|---|
array | Directory array |