Content type CMS_IMGDESCR which displays the description of the selected image.

package Core
subpackage Content Type

 Methods

Initialises class attributes and handles store events.

__construct(string $rawSettings, integer $id, array $contentTypes) : void

Parameters

$rawSettings

string

the raw settings in an XML structure or as plaintext

$id

integer

ID of the content type, e.g. 3 if CMS_DATE[3] is used

$contentTypes

array

array containing the values of all content types

Builds an array with directory information from the given upload path.

buildDirectoryList(string $uploadPath) : array
Inherited
inherited_from \cContentTypeAbstract::buildDirectoryList()
inherited_from \cContentTypeAbstractTabbed::buildDirectoryList()
inherited_from \cContentTypeImgeditor::buildDirectoryList()

Parameters

$uploadPath

string

path 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()
inherited_from \cContentTypeImgeditor::generateDirectoryList()

Parameters

$dirs

array

directory 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

Generate a select box containing all files in the given directory.

generateFileSelect(string $directoryPath) : string
Inherited
inherited_from \cContentTypeImgeditor::generateFileSelect()

Parameters

$directoryPath

string

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

Gets the meta data of the image with the given filename/dirname.

getImageMeta(string $filename, string $dirname) : string
Inherited
inherited_from \cContentTypeImgeditor::getImageMeta()

Parameters

$filename

string

the filename of the image

$dirname

string

the dirname of the image

Returns

stringJSON-encoded array with meta data

Creates an upload directory.

uplmkdir(string $path, string $name) 
Inherited

Wrapper function for uplmkdir in functions.upl.php.

inherited_from \cContentTypeImgeditor::uplmkdir()

Parameters

$path

string

Path to directory to create, either path from client upload directory or a dbfs path

$name

string

Name of directory to create

Uploads the transmitted files saved in the $_FILES array.

uplupload(string $path) : string
Inherited
inherited_from \cContentTypeImgeditor::uplupload()

Parameters

$path

string

the path to which the file should be uploaded

Returns

stringthe filename of the uploaded file

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()
inherited_from \cContentTypeImgeditor::_encodeForOutput()

Parameters

$code

string

code to encode

Returns

stringencoded code

Generates the code for the action buttons (save and cancel).

_generateActionCode() : string
Inherited
inherited_from \cContentTypeAbstractTabbed::_generateActionCode()
inherited_from \cContentTypeImgeditor::_generateActionCode()

Returns

string- the encoded code for the action buttons

Generates the encoded code for the tab menu.

_generateTabMenuCode(array $tabs) : string
Inherited
inherited_from \cContentTypeAbstractTabbed::_generateTabMenuCode()
inherited_from \cContentTypeImgeditor::_generateTabMenuCode()

Parameters

$tabs

array

associative array mapping the tab IDs to the tab names

Returns

string- the encoded code for the tab menu

Checks whether the directory defined by the given directory information is the currently active directory.

_isActiveDirectory(array $dirData) : boolean
Inherited

Overwrite in subclasses if you use getDirectoryList!

inherited_from \cContentTypeImgeditor::_isActiveDirectory()

Parameters

$dirData

array

directory 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()
inherited_from \cContentTypeImgeditor::_isSubdirectory()

Parameters

$subDir

string

the potential subdirectory

$dir

string

the 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
Inherited
inherited_from \cContentTypeAbstract::_readSettings()
inherited_from \cContentTypeAbstractTabbed::_readSettings()
inherited_from \cContentTypeImgeditor::_readSettings()

Checks whether the directory defined by the given directory information should be shown expanded.

_shouldDirectoryBeExpanded(array $dirData) : boolean
Inherited

Overwrite in subclasses if you use getDirectoryList!

inherited_from \cContentTypeImgeditor::_shouldDirectoryBeExpanded()

Parameters

$dirData

array

directory 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 \cContentTypeImgeditor::_storeSettings()

Generates the link to the image for use in the src attribute.

_generateImagePath() : string
Inherited
inherited_from \cContentTypeImgeditor::_generateImagePath()

Returns

stringthe link to the image

Generates code for the directories tab in which various settings can be made.

_generateTabDirectories() : string
Inherited
inherited_from \cContentTypeImgeditor::_generateTabDirectories()

Returns

string- the code for the directories tab

Generates code for the meta tab in which the images's meta data can be edited.

_generateTabMeta() : string
Inherited
inherited_from \cContentTypeImgeditor::_generateTabMeta()

Returns

string- the code for the meta tab

Generates code for the upload tab in which new images can be uploaded.

_generateTabUpload() : string
Inherited
inherited_from \cContentTypeImgeditor::_generateTabUpload()

Returns

string- the code for the upload tab

 Properties

 

$_cfg : array
Inherited
inherited_from \cContentTypeAbstract::$$_cfg
inherited_from \cContentTypeAbstractTabbed::$$_cfg
inherited_from \cContentTypeImgeditor::$$_cfg
 

$_cfgClient : array
Inherited
inherited_from \cContentTypeAbstract::$$_cfgClient
inherited_from \cContentTypeAbstractTabbed::$$_cfgClient
inherited_from \cContentTypeImgeditor::$$_cfgClient
 

$_client : integer
Inherited
inherited_from \cContentTypeAbstract::$$_client
inherited_from \cContentTypeAbstractTabbed::$$_client
inherited_from \cContentTypeImgeditor::$$_client
 

$_contentTypes : array
Inherited
inherited_from \cContentTypeAbstract::$$_contentTypes
inherited_from \cContentTypeAbstractTabbed::$$_contentTypes
inherited_from \cContentTypeImgeditor::$$_contentTypes
 

$_description : string
Inherited
inherited_from \cContentTypeImgeditor::$$_description
 

$_formFields : array
Inherited
inherited_from \cContentTypeAbstract::$$_formFields
inherited_from \cContentTypeAbstractTabbed::$$_formFields
inherited_from \cContentTypeImgeditor::$$_formFields
 

$_id : integer
Inherited

3 if CMS_TEASER[3] is used.

inherited_from \cContentTypeAbstract::$$_id
inherited_from \cContentTypeAbstractTabbed::$$_id
inherited_from \cContentTypeImgeditor::$$_id
 

$_idArt : integer
Inherited
inherited_from \cContentTypeAbstract::$$_idArt
inherited_from \cContentTypeAbstractTabbed::$$_idArt
inherited_from \cContentTypeImgeditor::$$_idArt
 

$_idArtLang : integer
Inherited
inherited_from \cContentTypeAbstract::$$_idArtLang
inherited_from \cContentTypeAbstractTabbed::$$_idArtLang
inherited_from \cContentTypeImgeditor::$$_idArtLang
 

$_idCat : integer
Inherited
inherited_from \cContentTypeAbstract::$$_idCat
inherited_from \cContentTypeAbstractTabbed::$$_idCat
inherited_from \cContentTypeImgeditor::$$_idCat
 

$_imagePath : string
Inherited
inherited_from \cContentTypeImgeditor::$$_imagePath
 

$_lang : integer
Inherited
inherited_from \cContentTypeAbstract::$$_lang
inherited_from \cContentTypeAbstractTabbed::$$_lang
inherited_from \cContentTypeImgeditor::$$_lang
 

$_prefix : string
Inherited

'teaser'.

inherited_from \cContentTypeAbstract::$$_prefix
inherited_from \cContentTypeAbstractTabbed::$$_prefix
inherited_from \cContentTypeImgeditor::$$_prefix
 

$_rawSettings : string
Inherited
inherited_from \cContentTypeAbstract::$$_rawSettings
inherited_from \cContentTypeAbstractTabbed::$$_rawSettings
inherited_from \cContentTypeImgeditor::$$_rawSettings
 

$_session : \Contenido_Session
Inherited
inherited_from \cContentTypeAbstract::$$_session
inherited_from \cContentTypeAbstractTabbed::$$_session
inherited_from \cContentTypeImgeditor::$$_session
 

$_settings : array
Inherited
inherited_from \cContentTypeAbstract::$$_settings
inherited_from \cContentTypeAbstractTabbed::$$_settings
inherited_from \cContentTypeImgeditor::$$_settings
 

$_settingsType : string
Inherited
inherited_from \cContentTypeAbstract::$$_settingsType
inherited_from \cContentTypeAbstractTabbed::$$_settingsType
inherited_from \cContentTypeImgeditor::$$_settingsType
 

$_type : string
Inherited

'CMS_TEASER'.

inherited_from \cContentTypeAbstract::$$_type
inherited_from \cContentTypeAbstractTabbed::$$_type
inherited_from \cContentTypeImgeditor::$$_type
 

$_uploadPath : string
Inherited
inherited_from \cContentTypeAbstract::$$_uploadPath
inherited_from \cContentTypeAbstractTabbed::$$_uploadPath
inherited_from \cContentTypeImgeditor::$$_uploadPath
 

$_useXHTML : boolean
Inherited
inherited_from \cContentTypeAbstract::$$_useXHTML
inherited_from \cContentTypeAbstractTabbed::$$_useXHTML
inherited_from \cContentTypeImgeditor::$$_useXHTML
   

$_dirname : string
Inherited
inherited_from \cContentTypeImgeditor::$$_dirname
 

$_fileSize : string
Inherited
inherited_from \cContentTypeImgeditor::$$_fileSize
 

$_fileType : string
Inherited
inherited_from \cContentTypeImgeditor::$$_fileType
 

$_filename : string
Inherited
inherited_from \cContentTypeImgeditor::$$_filename
 

$_internalNotice : string
Inherited
inherited_from \cContentTypeImgeditor::$$_internalNotice
 

$_keywords : string
Inherited
inherited_from \cContentTypeImgeditor::$$_keywords
 

$_medianame : string
Inherited
inherited_from \cContentTypeImgeditor::$$_medianame

 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
inherited_from \cContentTypeImgeditor::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
inherited_from \cContentTypeImgeditor::SETTINGS_TYPE_XML