Content type CMS_HTML which lets the editor enter HTML with the help of a WYSIWYG editor.

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()

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()

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

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()

Parameters

$code

string

code to encode

Returns

stringencoded code

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 generateDirectoryList!

inherited_from \cContentTypeAbstract::_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()

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()

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 \cContentTypeAbstract::_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 \cContentTypeAbstract::_storeSettings()

 Properties

 

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

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

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

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

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

$_id : integer
Inherited

3 if CMS_TEASER[3] is used.

inherited_from \cContentTypeAbstract::$$_id
 

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

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

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

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

$_prefix : string
Inherited

'teaser'.

inherited_from \cContentTypeAbstract::$$_prefix
 

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

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

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

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

$_type : string
Inherited

'CMS_TEASER'.

inherited_from \cContentTypeAbstract::$$_type
 

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

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

 Constants

 

Constant defining that the settings should be interpreted as plaintext.

SETTINGS_TYPE_PLAINTEXT 
Inherited
inherited_from \cContentTypeAbstract::SETTINGS_TYPE_PLAINTEXT
 

Constant defining that the settings should be interpreted as XML.

SETTINGS_TYPE_XML 
Inherited
inherited_from \cContentTypeAbstract::SETTINGS_TYPE_XML