Overview

Packages

  • CONTENIDO
  • Core
    • Authentication
    • Backend
    • Cache
    • CEC
    • Chain
    • ContentType
    • Database
    • Debug
    • Exception
    • Frontend
      • Search
      • URI
      • Util
    • GenericDB
      • Model
    • GUI
      • HTML
    • I18N
    • LayoutHandler
    • Log
    • Security
    • Session
    • Util
    • Validation
    • Versioning
    • XML
  • Module
    • ContentSitemapHtml
    • ContentSitemapXml
    • ContentUserForum
    • NavigationTop
    • ScriptCookieDirective
  • mpAutoloaderClassMap
  • None
  • PHP
  • Plugin
    • ContentAllocation
    • CronjobOverview
    • FormAssistant
    • FrontendLogic
    • FrontendUsers
    • Linkchecker
    • ModRewrite
    • Newsletter
    • Repository
      • FrontendNavigation
      • KeywordDensity
    • SIWECOS
    • SmartyWrapper
    • UrlShortener
    • UserForum
    • Workflow
  • PluginManager
  • Setup
    • Form
    • GUI
    • Helper
      • Environment
      • Filesystem
      • MySQL
      • PHP
    • UpgradeJob

Classes

  • cCodeGeneratorAbstract
  • cCodeGeneratorFactory
  • cCodeGeneratorStandard
  • cContentTypeAbstract
  • cContentTypeAbstractTabbed
  • cContentTypeDate
  • cContentTypeFilelist
  • cContentTypeHead
  • cContentTypeHtml
  • cContentTypeHtmlhead
  • cContentTypeImg
  • cContentTypeImgdescr
  • cContentTypeImgeditor
  • cContentTypeLink
  • cContentTypeLinkdescr
  • cContentTypeLinkeditor
  • cContentTypeLinktarget
  • cContentTypeRaw
  • cContentTypeTeaser
  • cContentTypeText
  • cTypeGenerator
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo

Class cContentTypeAbstract

Abstract content type from which every content type should inherit.

Direct known subclasses

cContentTypeAbstractTabbed, cContentTypeDate, cContentTypeHtml, cContentTypeRaw, cContentTypeText

Indirect known subclasses

cContentTypeFilelist, cContentTypeHead, cContentTypePifaForm, cContentTypeTeaser, cContentTypeUserForum, cContentTypeHtmlhead, cContentTypeImg, cContentTypeImgdescr, cContentTypeImgeditor, cContentTypeLink, cContentTypeLinkdescr, cContentTypeLinkeditor, cContentTypeLinktarget
Abstract
Package: Core\ContentType
Copyright: four for business AG <www.4fb.de>
License: http://www.contenido.org/license/LIZENZ.txt
Author: Simon Sprankel
Located at classes/content_types/class.content.type.abstract.php
Methods summary
public
# __construct( string $rawSettings, integer $id, array $contentTypes )

Constructor to create an instance of this class.

Constructor to create an instance of this class.

Initialises class attributes with values from cRegistry.

Parameters

$rawSettings
string
$rawSettings the raw settings in an XML structure or as plaintext
$id
integer
$id ID of the content type, e.g. 3 if CMS_TEASER[3] is used
$contentTypes
array
$contentTypes array containing the values of all content types
protected
# _readSettings( )

Reads all settings from the $_rawSettings attribute (XML or plaintext) and stores them in the $_settings attribute (associative array or plaintext).

Reads all settings from the $_rawSettings attribute (XML or plaintext) and stores them in the $_settings attribute (associative array or plaintext).

public array|string
# getConfiguration( )

Function returns current content type configuration as array

Function returns current content type configuration as array

Returns

array|string
protected
# _storeSettings( )

Stores all values from the $_POST array in the $_settings attribute (associative array) and saves them in the database (XML).

Stores all values from the $_POST array in the $_settings attribute (associative array) and saves them in the database (XML).

Throws

cDbException
protected string
# _encodeForOutput( string $code )

Since the content type code is evaled by php, the code has to be encoded.

Since the content type code is evaled by php, the code has to be encoded.

Parameters

$code
string
$code code to encode

Returns

string
encoded code
public array
# buildDirectoryList( string $uploadPath = '' )

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

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

Parameters

$uploadPath
string
$uploadPath [optional] path to upload directory (default: root upload path of client)

Returns

array
with directory information (keys: name, path, sub)

SuppressWarnings

docBlocks
public string
# generateDirectoryList( array $dirs )

Generates a directory list from the given directory information (which is typically built by cContentTypeAbstract::buildDirectoryList()).

Generates a directory list from the given directory information (which is typically built by cContentTypeAbstract::buildDirectoryList()).

Parameters

$dirs
array
$dirs directory information

Returns

string
HTML code showing a directory list

Throws

cInvalidArgumentException
protected boolean
# _isActiveDirectory( array $dirData )

Checks whether the directory defined by the given directory information is the currently active directory. Overwrite in subclasses if you use generateDirectoryList!

Checks whether the directory defined by the given directory information is the currently active directory. Overwrite in subclasses if you use generateDirectoryList!

Parameters

$dirData
array
$dirData directory information

Returns

boolean
whether the directory is the currently active directory
protected boolean
# _shouldDirectoryBeExpanded( array $dirData )

Checks whether the directory defined by the given directory information should be shown expanded. Overwrite in subclasses if you use getDirectoryList!

Checks whether the directory defined by the given directory information should be shown expanded. Overwrite in subclasses if you use getDirectoryList!

Parameters

$dirData
array
$dirData directory information

Returns

boolean
whether the directory should be shown expanded
protected boolean
# _isSubdirectory( string $subDir, string $dir )

Checks whether the given $subDir is a subdirectory of the given $dir.

Checks whether the given $subDir is a subdirectory of the given $dir.

Parameters

$subDir
string
$subDir the potential subdirectory
$dir
string
$dir the parent directory

Returns

boolean
whether the given $subDir is a subdirectory of $dir
public string
# __toString( )

This functions able to use a content type object directly for output See also CON-2587

This functions able to use a content type object directly for output See also CON-2587

Returns

string
abstract public string
# generateViewCode( )

Generates the code which should be shown if this content type is shown in the frontend.

Generates the code which should be shown if this content type is shown in the frontend.

Returns

string
escaped HTML code which sould be shown if content type is shown in frontend
abstract public string
# generateEditCode( )

Generates the code which should be shown if this content type is edited.

Generates the code which should be shown if this content type is edited.

Returns

string
escaped HTML code which should be shown if content type is edited
public boolean
# isWysiwygCompatible( )

Checks if this content type can be edited by a WYSIWYG editor

Checks if this content type can be edited by a WYSIWYG editor

Returns

boolean
Constants summary
string SETTINGS_TYPE_PLAINTEXT 'plaintext'
#

Constant defining that the settings should be interpreted as plaintext.

Constant defining that the settings should be interpreted as plaintext.

string SETTINGS_TYPE_XML 'xml'
#

Constant defining that the settings should be interpreted as XML.

Constant defining that the settings should be interpreted as XML.

Properties summary
protected string $_type ''
#

Name of the content type, e.g. 'CMS_TEASER'.

Name of the content type, e.g. 'CMS_TEASER'.

protected string $_prefix 'abstract'
#

Prefix of the content type, e.g. 'teaser'.

Prefix of the content type, e.g. 'teaser'.

protected string $_settingsType cContentTypeAbstract::SETTINGS_TYPE_PLAINTEXT
#

Whether the settings should be interpreted as plaintext or XML.

Whether the settings should be interpreted as plaintext or XML.

protected integer $_id
#

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

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

protected array $_contentTypes
#

Array containing the values of all content types.

Array containing the values of all content types.

protected array $_cfg
#

CONTENIDO configuration array

CONTENIDO configuration array

protected integer $_idArtLang
#

idartlang of corresponding article

idartlang of corresponding article

protected integer $_idArt
#

idart of corresponding article

idart of corresponding article

protected integer $_idCat
#

idcat of corresponding article

idcat of corresponding article

protected integer $_client
#

CONTENIDO client id

CONTENIDO client id

protected integer $_lang
#

CONTENIDO language id

CONTENIDO language id

protected cSession $_session
#

CONTENIDO session object

CONTENIDO session object

protected array $_cfgClient
#

CONTENIDO configuration array for currently active client

CONTENIDO configuration array for currently active client

protected boolean $_useXHTML
#

Whether to generate XHTML

Whether to generate XHTML

protected string $_uploadPath
#

The path to the upload directory.

The path to the upload directory.

protected string $_rawSettings array()
#

The raw settings from the DB.

The raw settings from the DB.

protected array|string $_settings array()
#

The parsed settings.

The parsed settings.

protected array $_formFields array()
#

List of form field names which are used by this content type!

List of form field names which are used by this content type!

CMS CONTENIDO 4.10.1 API documentation generated by ApiGen 2.8.0