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
    • ContentRssCreator
    • ContentSitemapHtml
    • ContentSitemapXml
    • ContentUserForum
    • NavigationTop
    • ScriptCookieDirective
  • mpAutoloaderClassMap
  • None
  • Plugin
    • ContentAllocation
    • CronjobOverview
    • FormAssistant
    • FrontendLogic
    • FrontendUsers
    • Linkchecker
    • ModRewrite
    • Newsletter
    • Repository
      • FrontendNavigation
      • KeywordDensity
    • SearchSolr
    • SmartyWrapper
    • UrlShortener
    • UserForum
    • Workflow
  • PluginManager
  • Setup
    • Form
    • GUI
    • Helper
      • Environment
      • Filesystem
      • MySQL
      • PHP
    • UpgradeJob
  • Smarty
    • Cacher
    • Compiler
    • Config
    • Debug
    • PluginsBlock
    • PluginsFilter
    • PluginsFunction
    • PluginsInternal
    • PluginsModifier
    • PluginsModifierCompiler
    • PluginsShared
    • Security
    • Template
    • TemplateResources
  • Swift
    • ByteStream
    • CharacterStream
    • Encoder
    • Events
    • KeyCache
    • Mailer
    • Mime
    • Plugins
    • Transport

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
  • Todo
  • Download

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 )

Initialises class attributes with values from cRegistry.

Initialises class attributes with values from cRegistry.

Parameters

$rawSettings

the raw settings in an XML structure or as plaintext

$id

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

$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
# getConfiguration( )

Function returns current content type configuration as array

Function returns current content type configuration as array

Returns

array
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).

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

path to upload directory (optional, default: root upload path of client)

Returns

array
with directory information (keys: name, path, sub)
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
directory information

Returns

string
HTML code showing a directory list
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
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
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
the potential subdirectory
$dir
the parent directory

Returns

boolean
whether the given $subDir is a subdirectory of $dir
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

Constant defining that the settings should be interpreted as plaintext.

Constant defining that the settings should be interpreted as plaintext.

# 'plaintext'
string SETTINGS_TYPE_XML

Constant defining that the settings should be interpreted as XML.

Constant defining that the settings should be interpreted as XML.

# '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

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

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

# 'abstract'
protected string $_settingsType

Whether the settings should be interpreted as plaintext or XML.

Whether the settings should be interpreted as plaintext or XML.

# cContentTypeAbstract::SETTINGS_TYPE_PLAINTEXT
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

The raw settings from the DB.

The raw settings from the DB.

# array()
protected array $_settings

The parsed settings.

The parsed settings.

# array()
protected array $_formFields

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

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

# array()
CMS CONTENIDO 4.9.7 API documentation generated by ApiGen