Class cApiArticleLanguageVersion
CONTENIDO API - Article Version Object
This object represents a CONTENIDO article version
Create object with $obj = new cApiArticleLanguageVersion(idartlangversion); or with $obj = new cApiArticleLanguageVersion(); $obj->loadByArticleLanguageIdAndVersion(idartlang, version);
You can now read the article version properties with $obj->getField(property);
List of article version properties:
idartlang - Language dependant article id idart - Language indepenant article id idclient - Id of the client idtplcfg - Template configuration id title - Internal Title pagetitle - HTML Title summary - Article summary created - Date created version - Version number iscurrentversion - 0 = false, 1 = true lastmodified - Date lastmodiefied author - Article author (username) online - On-/offline redirect - Redirect redirect_url - Redirect URL artsort - Article sort key timemgmt - Time management datestart - Time management start date dateend - Time management end date status - Article status free_use01 - Free to use free_use02 - Free to use free_use03 - Free to use time_move_cat - Move category after time management time_target_cat - Move category to this cat after time management time_online_move - Set article online after move external_redirect - Open article in new window locked - Article is locked for editing searchable - Whether article should be found via search sitemapprio - The priority for the sitemap
You can extract article version content with the $obj->getContent(contype [, number]) method.
To extract the first headline you can use:
$headline = $obj->getContent("htmlhead", 1);
If the second parameter is ommitted the method returns an array with all available content of this type. The array has the following schema:
array(number => content);
$headlines = $obj->getContent("htmlhead");
$headlines[1] First headline $headlines[2] Second headline $headlines[6] Sixth headline
Legal content type string are defined in the CONTENIDO system table 'con_type'. Default content types are:
NOTE: This parameter is case insesitive, you can use html or cms_HTML or CmS_HtMl. Your don't need start with cms, but it won't crash if you do so.
htmlhead - HTML Headline html - HTML Text headline - Headline (no HTML) text - Text (no HTML) img - Upload id of the element imgdescr - Image description link - Link (URL) linktarget - Linktarget (_self, _blank, _top ...) linkdescr - Linkdescription swf - Upload id of the element
- cGenericDb
- cItemBaseAbstract
- Item
- cApiArticleLanguage
- cApiArticleLanguageVersion
Copyright: four for business AG <www.4fb.de>
License: http://www.contenido.org/license/LIZENZ.txt
Author: Jann Dieckmann
Located at classes/contenido/class.articlelanguageversion.php
public
|
#
__construct( mixed $id = false, boolean $fetchContent = false )
Constructor to create an instance of this class. |
public
|
#
markAsCurrentVersion( mixed $isCurrentVersion )
Set iscurrentversion = 0 in the current version and set iscurrentversion = 1 in this version |
public
|
#
markAsCurrent( string $type = '' )
Set this ArticleVersion with its ContentVersions as current: Copy data from this ArticleLanguageVersion to ArticleLanguage Update Contents in ArticleLanguage Set property iscurrentversion = 1 in this ArticleLanguageVersion and 0 in the current ArticleLanguageVersions |
public
|
#
markAsEditable( string $type = '' )
Create a copy of this article language version with its contents, the copy is the new editable article language version |
public
boolean
|
#
loadByArticleLanguageIdAndVersion( integer $idArtLang, integer $version, boolean $fetchContent = false )
Load data by article language id and version |
protected
integer
|
#
_getIdArtLangVersion( integer $idArtLang, integer $version )
Extract 'idartlangversion' for a specified 'idartlang' and 'version' |
protected
|
#
_getArticleVersionContent( )
Load the articles version content and store it in the 'content' property of the article version object: $article->content[type][number] = value; |
public
string|array
|
__get(),
__set(),
_getPropertiesCollectionInstance(),
_getSecondDBInstance(),
_setLoaded(),
_setPrimaryKeyName(),
escape(),
getPrimaryKeyName(),
isLoaded()
|
_executeCallbacks(),
register(),
unregister()
|
CREATE_BEFORE,
CREATE_FAILURE,
CREATE_SUCCESS,
DELETE_BEFORE,
DELETE_FAILURE,
DELETE_SUCCESS,
STORE_BEFORE,
STORE_FAILURE,
STORE_SUCCESS
|
public
array
|
$tab |
|
#
Config array |
public
array
|
$content | NULL |
#
Article Version content |
$_arrInFilters,
$_arrOutFilters,
$_lastSQL,
$_metaObject,
$modifiedValues,
$oldPrimaryKey,
$values
|
$_className,
$_loaded,
$_oCache,
$_primaryKeyName,
$_settings,
$db,
$lasterror,
$properties,
$secondDb,
$table
|