Overview

Packages

  • Core
    • Authentication
    • Backend
    • Cache
    • CEC
    • Chain
    • ContentType
    • Database
    • Datatype
    • Debug
    • Exception
    • Frontend
      • Search
      • URI
      • Util
    • GenericDB
      • Model
    • GUI
      • HTML
    • I18N
    • LayoutHandler
    • Log
    • Security
    • Session
    • Util
    • Validation
    • Versioning
    • XML
  • Module
    • ContentSitemapHtml
    • ContentSitemapXml
    • ContentUserForum
    • NavigationTop
  • 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
  • cApiArticleSpecification
  • cApiArticleSpecificationCollection
  • cApiCategory
  • cApiCategoryArticle
  • cApiCategoryArticleCollection
  • cApiCategoryCollection
  • cApiCategoryLanguage
  • cApiCategoryLanguageCollection
  • cApiCategoryTree
  • cApiCategoryTreeCollection
  • cApiClient
  • cApiClientCollection
  • cApiClientLanguage
  • cApiClientLanguageCollection
  • cApiCommunication
  • cApiCommunicationCollection
  • cApiContainer
  • cApiContainerCollection
  • cApiContainerConfiguration
  • cApiContainerConfigurationCollection
  • cApiContent
  • cApiContentCollection
  • 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
  • cApiMetaType
  • cApiMetaTypeCollection
  • cApiModule
  • cApiModuleCollection
  • cApiNavMain
  • cApiNavMainCollection
  • cApiNavSub
  • cApiNavSubCollection
  • cApiOnlineUser
  • cApiOnlineUserCollection
  • cApiPathresolveCache
  • cApiPathresolveCacheCollection
  • cApiProperty
  • cApiPropertyCollection
  • cApiRight
  • cApiRightCollection
  • cApiStat
  • cApiStatCollection
  • cApiSystemProperty
  • cApiSystemPropertyCollection
  • cApiTemplate
  • cApiTemplateCollection
  • cApiTemplateConfiguration
  • cApiTemplateConfigurationCollection
  • cApiType
  • cApiTypeCollection
  • cApiUpload
  • cApiUploadCollection
  • cApiUploadMeta
  • cApiUploadMetaCollection
  • cApiUser
  • cApiUserCollection
  • 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
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, boolean $fetchContent = false )

Constructor Function

Constructor Function

Parameters

$mId
mixed
$mId Specifies the ID of item to load
$fetchContent
boolean
$fetchContent Flag to fetch content

Throws

cInvalidArgumentException
If table name or primary key is not set

Overrides

Item::__construct()
public boolean
# loadByArticleAndLanguageId( integer $idart, integer $idlang, boolean $fetchContent = false )

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
$fetchContent
boolean
$fetchContent Flag to fetch content

Returns

boolean
true on success, otherwhise 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;

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;

public string
# getField( string $name )

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

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 Flag to run defined inFilter on passed value

Returns

boolean

Todo

should return return value of overloaded method

Overrides

Item::setField()
public string
# 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 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

Parameters

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

Returns

string
array data
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 change language id for URL (optional)

Returns

string
link
Methods inherited from Item
_inFilter(), _loadByWhereClause(), _onLoad(), _outFilter(), _setMetaObject(), deleteProperty(), deletePropertyById(), get(), getMetaObject(), getProperty(), isLoaded(), loadBy(), loadByMany(), loadByPrimaryKey(), loadByRecordSet(), set(), setFilters(), setProperty(), store(), toArray(), toObject()
Methods inherited from cItemBaseAbstract
_getPropertiesCollectionInstance(), _getSecondDBInstance(), escape()
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

Properties inherited from Item
$_arrInFilters, $_arrOutFilters, $_lastSQL, $_metaObject, $modifiedValues, $oldPrimaryKey, $values
Properties inherited from cItemBaseAbstract
$_className, $_oCache, $_settings, $db, $lasterror, $primaryKey, $properties, $secondDb, $table, $virgin
CMS CONTENIDO 4.9.1 API documentation generated by ApiGen 2.8.0