Content type CMS_HEAD which lets the editor enter a single-line text.

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 \cContentTypeText::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 \cContentTypeText::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
Inherited
inherited_from \cContentTypeText::generateEditCode()

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
Inherited
inherited_from \cContentTypeText::generateViewCode()

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

Parameters

$code

string

code to encode

Returns

stringencoded code

Generates the JS code for this content type.

_getEditJavaScript() : string
Inherited
inherited_from \cContentTypeText::_getEditJavaScript()

Returns

stringthe JS code for the content type

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

 Properties

 

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

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

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

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

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

$_id : integer
Inherited

3 if CMS_TEASER[3] is used.

inherited_from \cContentTypeAbstract::$$_id
inherited_from \cContentTypeText::$$_id
 

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

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

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

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

$_prefix : string
Inherited

'teaser'.

inherited_from \cContentTypeAbstract::$$_prefix
inherited_from \cContentTypeText::$$_prefix
 

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

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

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

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

$_type : string
Inherited

'CMS_TEASER'.

inherited_from \cContentTypeAbstract::$$_type
inherited_from \cContentTypeText::$$_type
 

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

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

 Constants

 

Constant defining that the settings should be interpreted as plaintext.

SETTINGS_TYPE_PLAINTEXT 
Inherited
inherited_from \cContentTypeAbstract::SETTINGS_TYPE_PLAINTEXT
inherited_from \cContentTypeText::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 \cContentTypeText::SETTINGS_TYPE_XML