Content type CMS_FILELIST which lets the editor select some folders or files.
The corresponding files are then shown in the frontend.
| package |
Core |
| subpackage |
Content Type |
Methods
Initialises class attributes and handles store events.
__construct(string $rawSettings, integer $id, array $contentTypes) : void
Parameters
$rawSettings
stringthe raw settings in an XML structure or as
plaintext
$id
integerID of the content type, e.g. 3 if CMS_TEASER[3] is
used
$contentTypes
arrayarray containing the values of all content
types
Returns all translation strings for mi18n.
addModuleTranslations(array $translationStrings) : array
Static
Parameters
$translationStrings
arraytranslation strings
Returns
arrayupdated translation string
Builds an array with directory information from the given upload path.
buildDirectoryList(string $uploadPath) : array
Inherited
| inherited_from |
\cContentTypeAbstract::buildDirectoryList() |
| inherited_from |
\cContentTypeAbstractTabbed::buildDirectoryList() |
Parameters
$uploadPath
stringpath to upload directory (optional, default:
root upload path
of client)
Returns
arraywith directory information (keys: name, path, sub)
Generates a directory list from the given directory information (which is
typically built by {@link cContentTypeAbstract::buildDirectoryList}).
generateDirectoryList(array $dirs) : string
Inherited
| inherited_from |
\cContentTypeAbstract::generateDirectoryList() |
| inherited_from |
\cContentTypeAbstractTabbed::generateDirectoryList() |
Parameters
$dirs
arraydirectory information
Returns
stringHTML code showing a directory list
Generates the code which should be shown if this content type is edited.
generateEditCode() : string
Returns
stringescaped HTML code which should be shown if content type is
edited
Function is called in edit- and viewmode in order to generate code for
output.
generateFileListCode() : string
Returns
stringgenerated code
Generate a select box containing all files for the manual tab.
generateFileSelect(string $directoryPath) : string
Parameters
$directoryPath
stringPath to directory of the files
Returns
stringrendered cHTMLSelectElement
Generates the code which should be shown if this content type is shown in
the frontend.
generateViewCode() : string
Returns
stringescaped HTML code which sould be shown if content type is
shown in frontend
Since the content type code is evaled by php, the code has to be encoded.
_encodeForOutput(string $code) : string
Inherited
| inherited_from |
\cContentTypeAbstract::_encodeForOutput() |
| inherited_from |
\cContentTypeAbstractTabbed::_encodeForOutput() |
Parameters
$code
stringcode to encode
Returns
stringencoded code
Generates the code for the action buttons (save and cancel).
_generateActionCode() : string
Inherited
| inherited_from |
\cContentTypeAbstractTabbed::_generateActionCode() |
Returns
string- the encoded code for the action buttons
Checks whether the directory defined by the given directory
information is the currently active directory.
_isActiveDirectory(array $dirData) : boolean
Overwrite in subclasses if you use generateDirectoryList!
Parameters
$dirData
arraydirectory information
Returns
booleanwhether the directory is the currently active directory
Checks whether the given $subDir is a subdirectory of the given $dir.
_isSubdirectory(string $subDir, string $dir) : boolean
Inherited
| inherited_from |
\cContentTypeAbstract::_isSubdirectory() |
| inherited_from |
\cContentTypeAbstractTabbed::_isSubdirectory() |
Parameters
$subDir
stringthe potential subdirectory
$dir
stringthe parent directory
Returns
booleanwhether the given $subDir is a subdirectory of $dir
Reads all settings from the $_rawSettings attribute (XML or plaintext)
and stores them in the $_settings attribute (associative array or
plaintext).
_readSettings() : void
Checks whether the directory defined by the given directory information
should be shown expanded.
_shouldDirectoryBeExpanded(array $dirData) : boolean
Overwrite in subclasses if you use getDirectoryList!
Parameters
$dirData
arraydirectory information
Returns
booleanwhether the directory should be shown expanded
Stores all values from the $_POST array in the $_settings attribute
(associative array) and saves them in the database (XML).
_storeSettings() : void
Inherited
| inherited_from |
\cContentTypeAbstract::_storeSettings() |
| inherited_from |
\cContentTypeAbstractTabbed::_storeSettings() |
Checks whether the file passes the date filters.
_applyDateFilters(array $fileStats) : boolean
Parameters
$fileStats
arrayfile information
Returns
booleanwhether the file passes the date filters
Removes all files not matching the filter criterias.
_applyFileFilters(array $fileList) : array
Parameters
$fileList
arrayfiles which should be filtered
Returns
arraywith filtered files
Generate a select box containing the already existing files in the manual
tab.
_generateExistingFileSelect() : string
Returns
stringrendered cHTMLSelectElement
Generates a select box containing the file extensions.
_generateExtensionSelect() : string
Returns
stringrendered cHTMLSelectElement
Generates a select box containing the sort order options (asc/desc).
_generateSortOrderSelect() : string
Returns
stringrendered cHTMLSelectElement
Generates a select box containing the sort options.
_generateSortSelect() : string
Returns
stringrendered cHTMLSelectElement
Generates a select box containing the filelist styles.
_generateStyleSelect() : string
Returns
stringrendered cHTMLSelectElement
Generates code for the directories tab.
_generateTabDirectories() : string
Returns
string- the code for the directories tab
Generates code for the filter tab.
_generateTabFilter() : string
Returns
string- the code for the filter link tab
Generates code for the general tab.
_generateTabGeneral() : string
Returns
string- the code for the general link tab
Generates code for the manual tab.
_generateTabManual() : string
Returns
string- the code for the manual link tab
Gets all subdirectories recursively.
_getAllSubdirectories(string $directoryPath, array $directories) : array
Parameters
$directoryPath
stringpath to directory
$directories
arrayalready found directories
Returns
arraycontaining all subdirectories and the initial directories
Method to fill single entry (file) of the file list.
fillFileListTemplateEntry(array $fileData, \cTemplate $template) : void
Parameters
$fileData
arrayinformation about the file
$template
\cTemplatereference to the used template object
Properties
$_cfg : array
Inherited
| inherited_from |
\cContentTypeAbstract::$$_cfg |
| inherited_from |
\cContentTypeAbstractTabbed::$$_cfg |
$_cfgClient : array
Inherited
| inherited_from |
\cContentTypeAbstract::$$_cfgClient |
| inherited_from |
\cContentTypeAbstractTabbed::$$_cfgClient |
$_client : integer
Inherited
| inherited_from |
\cContentTypeAbstract::$$_client |
| inherited_from |
\cContentTypeAbstractTabbed::$$_client |
$_contentTypes : array
Inherited
| inherited_from |
\cContentTypeAbstract::$$_contentTypes |
| inherited_from |
\cContentTypeAbstractTabbed::$$_contentTypes |
$_id : integer
Inherited
3 if CMS_TEASER[3] is used.
| inherited_from |
\cContentTypeAbstract::$$_id |
| inherited_from |
\cContentTypeAbstractTabbed::$$_id |
$_idArt : integer
Inherited
| inherited_from |
\cContentTypeAbstract::$$_idArt |
| inherited_from |
\cContentTypeAbstractTabbed::$$_idArt |
$_idArtLang : integer
Inherited
| inherited_from |
\cContentTypeAbstract::$$_idArtLang |
| inherited_from |
\cContentTypeAbstractTabbed::$$_idArtLang |
$_idCat : integer
Inherited
| inherited_from |
\cContentTypeAbstract::$$_idCat |
| inherited_from |
\cContentTypeAbstractTabbed::$$_idCat |
$_lang : integer
Inherited
| inherited_from |
\cContentTypeAbstract::$$_lang |
| inherited_from |
\cContentTypeAbstractTabbed::$$_lang |
$_prefix : string
Inherited
| inherited_from |
\cContentTypeAbstract::$$_prefix |
| inherited_from |
\cContentTypeAbstractTabbed::$$_prefix |
$_rawSettings : string
Inherited
| inherited_from |
\cContentTypeAbstract::$$_rawSettings |
| inherited_from |
\cContentTypeAbstractTabbed::$$_rawSettings |
$_session : \Contenido_Session
Inherited
| inherited_from |
\cContentTypeAbstract::$$_session |
| inherited_from |
\cContentTypeAbstractTabbed::$$_session |
$_settings : array
Inherited
| inherited_from |
\cContentTypeAbstract::$$_settings |
| inherited_from |
\cContentTypeAbstractTabbed::$$_settings |
$_settingsType : string
Inherited
| inherited_from |
\cContentTypeAbstract::$$_settingsType |
| inherited_from |
\cContentTypeAbstractTabbed::$$_settingsType |
$_translations : array
Important: This must be a static array!
$_type : string
Inherited
| inherited_from |
\cContentTypeAbstract::$$_type |
| inherited_from |
\cContentTypeAbstractTabbed::$$_type |
$_uploadPath : string
Inherited
| inherited_from |
\cContentTypeAbstract::$$_uploadPath |
| inherited_from |
\cContentTypeAbstractTabbed::$$_uploadPath |
$_useXHTML : boolean
Inherited
| inherited_from |
\cContentTypeAbstract::$$_useXHTML |
| inherited_from |
\cContentTypeAbstractTabbed::$$_useXHTML |
Constants
Constant defining that the settings should be interpreted as plaintext.
SETTINGS_TYPE_PLAINTEXT
Inherited
| inherited_from |
\cContentTypeAbstract::SETTINGS_TYPE_PLAINTEXT |
| inherited_from |
\cContentTypeAbstractTabbed::SETTINGS_TYPE_PLAINTEXT |
Constant defining that the settings should be interpreted as XML.
SETTINGS_TYPE_XML
Inherited
| inherited_from |
\cContentTypeAbstract::SETTINGS_TYPE_XML |
| inherited_from |
\cContentTypeAbstractTabbed::SETTINGS_TYPE_XML |