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

  • cContentVersioning
  • cVersion
  • cVersionFile
  • cVersionLayout
  • cVersionModule
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo

Class cContentVersioning

Versioning.

Package: Core\Versioning
Copyright: four for business AG <www.4fb.de>
License: http://www.contenido.org/license/LIZENZ.txt
Author: Jann Dieckmann
Located at classes/versioning/class.contentversioning.php
Methods summary
public
# __construct( )

Constructor to create an instance of this class.

Constructor to create an instance of this class.

public array
# sortResults( array $result )

Cms type sort function for article output.

Cms type sort function for article output.

Parameters

$result
array
$result[cms type][typeId] = value

Returns

array
$result[cms type][typeId] = value

SuppressWarnings

docBlocks
public string
# getTimeDiff( string $lastModified )

Return date for select box. If current time - lastModified < 1 hour return "%d minutes ago" else return "Y-M-D H:I:S".

Return date for select box. If current time - lastModified < 1 hour return "%d minutes ago" else return "Y-M-D H:I:S".

Parameters

$lastModified
string
$lastModified

Returns

string
public static string
# getState( )

Returns the current versioning state (disabled (default), simple, advanced).

Returns the current versioning state (disabled (default), simple, advanced).

Returns

string
$versioningState

Throws

cDbException
cException
public cApiArticleLanguage|cApiArticleLanguageVersion
# getSelectedArticle( integer $idArtLangVersion, integer $idArtLang, string $articleType, integer $selectedArticleId = NULL )

Returns selected article.

Returns selected article.

Parameters

$idArtLangVersion
integer
$idArtLangVersion
$idArtLang
integer
$idArtLang
$articleType
string
$articleType
$selectedArticleId
integer
$selectedArticleId [optional]

Returns

cApiArticleLanguage|cApiArticleLanguageVersion
$this->selectedArticle

Throws

cDbException
cException

Todo

$idArtlangVersion <-> $selectedArticleId
public array
# getList( integer $idArtLang, string $articleType )

Returns $list[1] = CMS_HTMLHEAD for every content existing in article/version with $idArtLang.

Returns $list[1] = CMS_HTMLHEAD for every content existing in article/version with $idArtLang.

Parameters

$idArtLang
integer
$idArtLang
$articleType
string
$articleType

Returns

array
$list

Throws

cDbException
cException
public integer
# getMaxIdContent( )

Return max idcontent.

Return max idcontent.

Returns

integer

Throws

cDbException
public string
# getArticleType( integer $idArtLangVersion, integer $idArtLang, string $action, mixed $selectedArticleId )

Returns type of article (current, version or editable).

Returns type of article (current, version or editable).

Parameters

$idArtLangVersion
integer
$idArtLangVersion
$idArtLang
integer
$idArtLang
$action
string
$action
$selectedArticleId
mixed
$selectedArticleId

Returns

string
$this->articleType

Throws

cDbException
cException
public string
# getVersionSelectionField( string $class, string $selectElement, string $copyToButton, string $infoText )

Parameters

$class
string
$class
$selectElement
string
$selectElement
$copyToButton
string
$copyToButton
$infoText
string
$infoText

Returns

string
public integer
# getEditableArticleId( integer $idArtLang )

Returns idartlangversion of editable article.

Returns idartlangversion of editable article.

Parameters

$idArtLang
integer
$idArtLang

Returns

integer
$editableArticleId

Throws

cDbException
cException
public array
# getContentId( integer $idArtLang, integer $typeId, integer $type, integer $versioningState, integer $articleType, integer $version )

Returns idcontent or idcontentversion.

Returns idcontent or idcontentversion.

Parameters

$idArtLang
integer
$idArtLang
$typeId
integer
$typeId
$type
integer
$type
$versioningState
integer
$versioningState
$articleType
integer
$articleType
$version
integer
$version

Returns

array
$idContent

Throws

cDbException

Todo

check datatype of return value
public array
# getDataForSelectElement( integer $idArtLang, string $selectElementType = '' )

Returns $artLangVersionMap[version][idartlangversion] = lastmodified either from each article-/content- or metatag-version.

Returns $artLangVersionMap[version][idartlangversion] = lastmodified either from each article-/content- or metatag-version.

Parameters

$idArtLang
integer
$idArtLang
$selectElementType
string
$selectElementType [optional] either 'content', 'seo' or 'config'

Returns

array

Throws

cException
public
# prepareContentForSaving( integer $idartlang, cApiContent $content, string $value )

Prepares content for saving (consider versioning-mode; prevents multiple storings for filelists e.g.).

Prepares content for saving (consider versioning-mode; prevents multiple storings for filelists e.g.).

Parameters

$idartlang
integer
$idartlang the contents idartlang
$content
cApiContent
$content the content to store
$value
string
$value the contents value to store

Throws

cDbException
cException
cInvalidArgumentException
public
# createContentVersion( array $parameters )

Create new content version.

Create new content version.

Parameters

$parameters
mixed[]
$parameters

Throws

cDbException
cException
cInvalidArgumentException
public cApiArticleLanguageVersion
# createArticleLanguageVersion( array $parameters )

Create new article language version.

Create new article language version.

Parameters

$parameters
mixed[]
$parameters

Returns

cApiArticleLanguageVersion

Throws

cDbException
cException
public cApiMetaTagVersion
# createMetaTagVersion( array $parameters )

Create new Meta Tag Version.

Create new Meta Tag Version.

Parameters

$parameters
mixed[]
$parameters {

Returns

cApiMetaTagVersion

Throws

cDbException
cException
cInvalidArgumentException
Properties summary
protected cDb $db
#

CONTENIDO database object

CONTENIDO database object

protected string $articleType
#

article type (current, version, editable)

article type (current, version, editable)

public cApiArticleLanguageVersion $selectedArticle
#

selected article language (version)

selected article language (version)

public integer $editableArticleId
#

editable article language version id

editable article language version id

CMS CONTENIDO 4.10.1 API documentation generated by ApiGen 2.8.0