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 cContentTypeDate

Content type CMS_DATE which allows the editor to select a date from a calendar and a date format. The selected date is then shown in the selected format.

cContentTypeAbstract
Extended by cContentTypeDate
Package: Core\ContentType
Copyright: four for business AG <www.4fb.de>
License: http://www.contenido.org/license/LIZENZ.txt
Author: Bilal Arslan
Author: Timo Trautmann
Author: Simon Sprankel
Located at classes/content_types/class.content.type.date.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 and handles store events.

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_DATE[3] is used
$contentTypes
array
$contentTypes array containing the values of all content types

Throws

cDbException
cException

Overrides

cContentTypeAbstract::__construct()
public string
# getDateTimestamp( )

Returns the displayed timestamp

Returns the displayed timestamp

Returns

string
public string
# getDateFormat( )

Returns the full PHP style format string

Returns the full PHP style format string

Returns

string
public string
# getTimeFormat( )

Returns only the time portion of the PHP style format string

Returns only the time portion of the PHP style format string

Returns

string
private string
# _formatDate( string $format, integer $timestamp = NULL )

Formats the given timestamp according to the given format. Localises the output.

Formats the given timestamp according to the given format. Localises the output.

Parameters

$format
string
$format the format string in the PHP date format
$timestamp
integer
$timestamp [optional] the timestamp representing the date which should be formatted

Returns

string
the formatted, localised date
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 should be shown if content type is shown in frontend
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

Throws

cInvalidArgumentException
private string
# _generateJavaScript( )

Generates the JavaScript needed for CMS_DATE.

Generates the JavaScript needed for CMS_DATE.

Returns

string
HTML code which includes the needed JavaScript

Throws

cInvalidArgumentException
private string
# _generateStoreButton( )

Generates the save button.

Generates the save button.

Returns

string
HTML code for the save button
private string
# _generateFormatSelect( )

Generates a select box for defining the format of the date.

Generates a select box for defining the format of the date.

Returns

string
the HTML code of the format select box
Methods inherited from cContentTypeAbstract
__toString(), _encodeForOutput(), _isActiveDirectory(), _isSubdirectory(), _readSettings(), _shouldDirectoryBeExpanded(), _storeSettings(), buildDirectoryList(), generateDirectoryList(), getConfiguration(), isWysiwygCompatible()
Constants inherited from cContentTypeAbstract
SETTINGS_TYPE_PLAINTEXT, SETTINGS_TYPE_XML
Properties summary
private array $_dateFormatsPhp
#

The possible PHP date formats in which the selected date can be displayed.

The possible PHP date formats in which the selected date can be displayed.

Properties inherited from cContentTypeAbstract
$_cfg, $_cfgClient, $_client, $_contentTypes, $_formFields, $_id, $_idArt, $_idArtLang, $_idCat, $_lang, $_prefix, $_rawSettings, $_session, $_settings, $_settingsType, $_type, $_uploadPath, $_useXHTML
CMS CONTENIDO 4.10.1 API documentation generated by ApiGen 2.8.0