Class cApiArticleLanguage
CONTENIDO API - Article Object
This object represents a CONTENIDO article
Create object with $obj = new cApiArticleLanguage(idartlang); or with $obj = new cApiArticleLanguage(); $obj->loadByArticleAndLanguageId(idart, lang);
You can now read the article properties with $obj->getField(property);
List of article 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 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 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
Direct known subclasses
cApiArticleLanguageVersionCopyright: four for business AG <www.4fb.de>
License: http://www.contenido.org/license/LIZENZ.txt
Author: Bjoern Behrens
Located at classes/contenido/class.articlelanguage.php
public
|
|
public
|
#
markAsEditable( string $type = '' )
Create a version of this article language with its contents/metatags; the version is the new editable article language version |
public
boolean
|
#
loadByArticleAndLanguageId( integer $idart, integer $idlang )
Load data by article and language id |
protected
integer
|
#
_getIdArtLang( integer $idart, integer $idlang )
Extract 'idartlang' for a specified 'idart' and 'idlang' |
public
|
#
loadArticleContent( )
Load the articles content and stores it in the 'content' property of the article object. |
protected
|
#
_getArticleContent( )
Load the articles content and stores it in the 'content' property of the article object. |
protected
|
#
_loadArticleContent( )
Load the articles content and stores it in the 'content' property of the article object, whenever it is needed to get the content of the article. |
public
string
|
|
public
boolean
|
|
public
string|array
|
|
public
boolean|
|
#
getContentObject( string $type, integer $id )
Similar to getContent this function returns the cContentType object |
public
string
|
#
getContentViewCode( string $type, integer $id )
Similar to getContent this function returns the view code of the cContentType object |
public
array
|
|
public
string
|
__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 content |
$_arrInFilters,
$_arrOutFilters,
$_lastSQL,
$_metaObject,
$modifiedValues,
$oldPrimaryKey,
$values
|
$_className,
$_loaded,
$_oCache,
$_primaryKeyName,
$_settings,
$db,
$lasterror,
$properties,
$secondDb,
$table
|