This class provides all methods for the content type CMS_FILELIST. All properties of the file list are
stored as a xml document in the database.
Methods
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
__construct(string $sContent, integer $iNumberOfCms, integer $iIdArtLang, array $sEditLink, array $aCfg, array $oDB, string $sContenidoLang, integer $iClient, integer $iLang, array $aCfgClient, object $oSess)
Parameters
$sContent
string
- xml document from database containing the settings
$iIdArtLang
integer
- Idartlang of current article
$sEditLink
array
- sEditlink for editbuttons, not currently used
$aCfg
array
- Contenido configuration array
$oDB
array
- Contenido database object
$sContenidoLang
string
- Contenido Backend language string
$iLang
integer
- Contenido frontend language id
$aCfgClient
array
- Contenido Client configuration array
Returns all translation strings for mi18n.
addModuleTranslations(array $aTranslationStrings) : array
Parameters
$aTranslationStrings
array
Array with translation strings
Returns
array
Translation strings
Builds a directory list by a given upload directory path.
buildDirectoryList(string $sUploadPath) : array
Parameters
$sUploadPath
string
Path to directory (per default the root upload path of client)
Returns
array
Array with directory information
Returns the directory list of an given directory array (by buildDirectoryList()).
getDirectoryList(array $aDirs) : string
Parameters
$aDirs
array
Array with directory information
Returns
string
html of the directory list
Function which generate a select box for the manual files.
getFileSelect(array $sDirectoryPath) : string
Parameters
$sDirectoryPath
array
Path to directory of the files
Returns
string
rendered cHTMLSelectElement
Checks recursively for sub directories
recursiveCheckForSubdirectories(string $sDirectoryPath, array $aDirectories) : array
Parameters
$sDirectoryPath
string
Path to directory
$aDirectories
array
Directory array
Returns
array
Directory array
Executes the file filters which removes all files not matching the filter criterias.
applyFileFilters(array $aFileList) : array
Parameters
$aFileList
array
array with files to check
Returns
array
array with filtered files
In Contenido content type code is evaled by php. To make this possible,
this function prepares code for evaluation
encodeForOutput(string $sCode) : string
Parameters
$sCode
string
code to escape
Returns
string
escaped code
Method to fill single entry (file) of the file list.
fillFileListTemplateEntry(array $aFileData, object $oTpl) : void
Parameters
$aFileData
array
Array with information about the file
$oTpl
object
Reference of the used template object
Function which generate a select box for existing files in the manual filelist.
getExistingFileSelect() : string
Returns
string
rendered cHTMLSelectElement
Function which generate a select box for the filelist extensions.
getExtensionSelect(array $aSelected) : string
Parameters
$aSelected
array
array with values which are selected
Returns
string
rendered cHTMLSelectElement
Function which generate a select box for the filelist sort order.
getSortOrderSelect(string $sSelected) : string
Parameters
$sSelected
string
value of select box which is selected
Returns
string
rendered cHTMLSelectElement
Function which generate a select box for the filelist sort.
getSortSelect(string $sSelected) : string
Parameters
$sSelected
string
value of select box which is selected
Returns
string
rendered cHTMLSelectElement
Function which generate a select box for setting filelist style.
getStyleSelect(string $sSelected) : string
Parameters
$sSelected
string
value of select box which is selected
Returns
string
rendered cHTMLSelectElement
Function parses XML document which contains file list settings
and store properties as array into $aSettings
readSettings() : void
Function gets all submitted values for new file list properties from
$_POST array, generates new corresponding config XML Document and
stores it as content, using contenido conSaveContentEntry() function
storeFileList() : void
Properties
Contenido configuration array
$aCfg : array
Contenido configuration array for current active client
$aCfgClient : array
Array with the date fields.
$aDateFields : array
Array with default file extensions.
$aFileExtensions : array
List of fieldnames in frontend (properties) which the file list has
and which were also described in the config xml document
$aFileListData : array
Array which contains current file list settings
$aSettings : array
Placeholders for labels in frontend.
$aTranslations : array
Important: This must be a static array!
Current Contenido client id
$iClient : integer
Current id of content type CMS_FILELIST[3] -> 3
$iId : integer
Idartlang of article, which is currently in edit- or viewmode
$iIdArtLang : integer
Current Contenido language id
$iLang : integer
Contenido database object
$oDb : object
Contenido session object
$oSess : object
String contains value of stored content in database
in this case this is the config xml document which is
later parsed and its settings were stored in $aSettings
$sContent : string
Contenido upload path for current client
$sUploadPath : string