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

Classes

  • cApiAction
  • cApiActionCollection
  • cApiActionlog
  • cApiActionlogCollection
  • cApiArea
  • cApiAreaCollection
  • cApiArticle
  • cApiArticleCollection
  • cApiArticleLanguage
  • cApiArticleLanguageCollection
  • cApiArticleLanguageVersion
  • cApiArticleLanguageVersionCollection
  • cApiArticleSpecification
  • cApiArticleSpecificationCollection
  • cApiCategory
  • cApiCategoryArticle
  • cApiCategoryArticleCollection
  • cApiCategoryCollection
  • cApiCategoryLanguage
  • cApiCategoryLanguageCollection
  • cApiCategoryTree
  • cApiCategoryTreeCollection
  • cApiClient
  • cApiClientCollection
  • cApiClientLanguage
  • cApiClientLanguageCollection
  • cApiCommunication
  • cApiCommunicationCollection
  • cApiContainer
  • cApiContainerCollection
  • cApiContainerConfiguration
  • cApiContainerConfigurationCollection
  • cApiContent
  • cApiContentCollection
  • cApiContentVersion
  • cApiContentVersionCollection
  • cApiDbfs
  • cApiDbfsCollection
  • cApiFile
  • cApiFileCollection
  • cApiFileInformation
  • cApiFileInformationCollection
  • cApiFrameFile
  • cApiFrameFileCollection
  • cApiFrontendGroup
  • cApiFrontendGroupCollection
  • cApiFrontendGroupMember
  • cApiFrontendGroupMemberCollection
  • cApiFrontendPermission
  • cApiFrontendPermissionCollection
  • cApiFrontendUser
  • cApiFrontendUserCollection
  • cApiGroup
  • cApiGroupCollection
  • cApiGroupMember
  • cApiGroupMemberCollection
  • cApiGroupProperty
  • cApiGroupPropertyCollection
  • cApiInUse
  • cApiInUseCollection
  • cApiIso3166
  • cApiIso3166Collection
  • cApiIso6392
  • cApiIso6392Collection
  • cApiKeyword
  • cApiKeywordCollection
  • cApiLanguage
  • cApiLanguageCollection
  • cApiLayout
  • cApiLayoutCollection
  • cApiMailLog
  • cApiMailLogCollection
  • cApiMailLogSuccess
  • cApiMailLogSuccessCollection
  • cApiMetaTag
  • cApiMetaTagCollection
  • cApiMetaTagVersion
  • cApiMetaTagVersionCollection
  • cApiMetaType
  • cApiMetaTypeCollection
  • cApiModule
  • cApiModuleCollection
  • cApiNavMain
  • cApiNavMainCollection
  • cApiNavSub
  • cApiNavSubCollection
  • cApiOnlineUser
  • cApiOnlineUserCollection
  • cApiPathresolveCache
  • cApiPathresolveCacheCollection
  • cApiProperty
  • cApiPropertyCollection
  • cApiRight
  • cApiRightCollection
  • cApiSearchTracking
  • cApiSearchTrackingCollection
  • cApiStat
  • cApiStatCollection
  • cApiSystemProperty
  • cApiSystemPropertyCollection
  • cApiTemplate
  • cApiTemplateCollection
  • cApiTemplateConfiguration
  • cApiTemplateConfigurationCollection
  • cApiType
  • cApiTypeCollection
  • cApiUpload
  • cApiUploadCollection
  • cApiUploadMeta
  • cApiUploadMetaCollection
  • cApiUser
  • cApiUserCollection
  • cApiUserPasswordRequest
  • cApiUserPasswordRequestCollection
  • cApiUserProperty
  • cApiUserPropertyCollection
  • NoteCollection
  • NoteItem
  • TODOCollection
  • TODOItem
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo

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
Extended by cItemBaseAbstract
Extended by Item
Extended by cApiArticleLanguage

Direct known subclasses

cApiArticleLanguageVersion
Package: Core\GenericDB\Model
Copyright: 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
Methods summary
public
# __construct( mixed $mId = false )

Constructor to create an instance of this class.

Constructor to create an instance of this class.

Parameters

$mId
mixed
$mId [optional] Specifies the ID of item to load

Throws

cInvalidArgumentException
If table name or primary key is not set

Overrides

Item::__construct()
public
# markAsEditable( string $type = '' )

Create a version of this article language with its contents/metatags; the version is the new editable article language version

Create a version of this article language with its contents/metatags; the version is the new editable article language version

Parameters

$type
string
$type meta, content or complete
public boolean
# loadByArticleAndLanguageId( integer $idart, integer $idlang )

Load data by article and language id

Load data by article and language id

Parameters

$idart
integer
$idart Article id
$idlang
integer
$idlang Language id Flag to fetch content

Returns

boolean
true on success, otherwise false
protected integer
# _getIdArtLang( integer $idart, integer $idlang )

Extract 'idartlang' for a specified 'idart' and 'idlang'

Extract 'idartlang' for a specified 'idart' and 'idlang'

Parameters

$idart
integer
$idart Article id
$idlang
integer
$idlang Language id

Returns

integer
Language dependant article id
public
# loadArticleContent( )

Load the articles content and stores it in the 'content' property of the article object.

Load the articles content and stores it in the 'content' property of the article object.

$article->content[type][number] = value;

Deprecated

[2015-05-15] use _loadArticleContent, automaticly loaded with getContent()
protected
# _getArticleContent( )

Load the articles content and stores it in the 'content' property of the article object.

Load the articles content and stores it in the 'content' property of the article object.

$article->content[type][number] = value;

Deprecated

[2015-05-15] use _loadArticleContent, automaticly loaded with getContent()
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.

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.

$article->content[type][number] = value;

public string
# getField( string $name, boolean $bSafe = true )

Get the value of an article property

Get the value of an article 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

Parameters

$name
string
$name
$bSafe
boolean
$bSafe [optional] Flag to run defined outFilter on passed value NOTE: It's not used ATM!

Returns

string
Value of property

Overrides

Item::getField()
public boolean
# setField( string $name, mixed $value, boolean $bSafe = true )

Userdefined setter for article language fields.

Userdefined setter for article language fields.

Parameters

$name
string
$name
$value
mixed
$value
$bSafe
boolean
$bSafe [optional] Flag to run defined inFilter on passed value

Returns

boolean

Overrides

Item::setField()
public string|array
# getContent( string $type = '', integer|null $id = NULL )

Get content(s) from an article.

Get content(s) from an article.

Returns the specified content element or an array("id"=>"value") if the second parameter is omitted.

Legal content type string are defined in the CONTENIDO system table 'con_type'. Default content types are:

NOTE: Parameter is case insensitive, you can use html or cms_HTML or CmS_HtMl. You don't need to 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

Parameters

$type
string
$type CMS_TYPE - Legal cms type string
$id
integer|null
$id [optional] Id of the content

Returns

string|array
data
public boolean|cContentTypeAbstract
# getContentObject( string $type, integer $id )

Similar to getContent this function returns the cContentType object

Similar to getContent this function returns the cContentType object

Parameters

$type
string
$type Name of the content type
$id
integer
$id Id of the content type in this article

Returns

boolean|cContentTypeAbstract
Returns false if the name was invalid
public string
# getContentViewCode( string $type, integer $id )

Similar to getContent this function returns the view code of the cContentType object

Similar to getContent this function returns the view code of the cContentType object

Parameters

$type
string
$type Name of the content type
$id
integer
$id Id of the content type in this article

Returns

string
public array
# getContentTypes( )

Returns all available content types

Returns all available content types

Returns

array

Throws

cException
if no content has been loaded
public string
# getLink( integer $changeLangId = 0 )

Returns the link to the current object.

Returns the link to the current object.

Parameters

$changeLangId
integer
$changeLangId [optional] change language id for URL (optional)

Returns

string
link
Methods inherited from Item
_inFilter(), _loadByWhereClause(), _onLoad(), _resetItem(), _setMetaObject(), deleteProperty(), deletePropertyById(), get(), getMetaObject(), getProperty(), loadBy(), loadByMany(), loadByPrimaryKey(), loadByRecordSet(), outFilter(), set(), setFilters(), setProperty(), store(), toArray(), toObject()
Methods inherited from cItemBaseAbstract
__get(), __set(), _getPropertiesCollectionInstance(), _getSecondDBInstance(), _setLoaded(), _setPrimaryKeyName(), escape(), getPrimaryKeyName(), isLoaded()
Methods inherited from cGenericDb
_executeCallbacks(), register(), unregister()
Constants inherited from cGenericDb
CREATE_BEFORE, CREATE_FAILURE, CREATE_SUCCESS, DELETE_BEFORE, DELETE_FAILURE, DELETE_SUCCESS, STORE_BEFORE, STORE_FAILURE, STORE_SUCCESS
Properties summary
public array $tab
#

Config array

Config array

public array $content NULL
#

Article content

Article content

Deprecated

[2015-05-27]
Properties inherited from Item
$_arrInFilters, $_arrOutFilters, $_lastSQL, $_metaObject, $modifiedValues, $oldPrimaryKey, $values
Properties inherited from cItemBaseAbstract
$_className, $_loaded, $_oCache, $_primaryKeyName, $_settings, $db, $lasterror, $properties, $secondDb, $table
CMS CONTENIDO 4.9.11 API documentation generated by ApiGen 2.8.0