kernel/private/api/content/content.php

Show: inherited
Table of Contents

File containing the ezpContent class.

Copyright
Copyright (C) 1999-2011 eZ Systems AS. All rights reserved.  
License
eZ Business Use License Agreement Version 2.0  
Package
API  
Version
4.6.0  

\ezpContent

Package: API

Class that represents a content item.

A content item is an abstract representation of a contentobject + contentobjecttreenode + attributes Provides full access to a content's data: - fields (attributes) per language - content metadata (publishing date, owner, etc) - content locations

Example 1, with a one language object:

$article = ezpContent::create( 'article' );
$article->fields->title = 'foo';
$article->fields->name = 'bar';

Example 2, with a multilingual object:

$article = ezpContent::create( 'article' );
$article->fields['eng-GB']->title = 'foo';
$article->fields['eng-GB']->name = 'bar';
$article->fields['fre-FR']->title = 'foo';
$article->fields['fre-FR']->name = 'bar';

Example 3, with a multilingual object but an alternative syntax

$article = ezpContent::create( 'article' );

$article->setActiveLanguage( 'eng-GB' );
$article->fields->title = 'foo';
$article->fields->name = 'bar';

$article->active_language = 'fre-FR';
$article->fields->title = 'foo';
$article->fields->name = 'bar';

Properties

Propertypublicstring  = ''

classIdentifier The content class identifier

classIdentifier The content class identifier
Details
Type
string
Magic
 
Property-read
classIdentifier The content class identifier  
Propertypublicint  = ''

datePublished The date the object was initially published, as a UNIX timestamp

datePublished The date the object was initially published, as a UNIX timestamp
Details
Type
int
Magic
 
Property-read
datePublished The date the object was initially published, as a UNIX timestamp  
Propertypublicint  = ''

dateModified The date the object was last modified, as a UNIX timestamp

dateModified The date the object was last modified, as a UNIX timestamp
Details
Type
int
Magic
 
Property-read
dateModified The date the object was last modified, as a UNIX timestamp  
Propertypublicstring  = ''

name The object's name in the active language

name The object's name in the active language
Details
Type
string
Magic
 
Property-read
name The object's name in the active language  
Propertypublicstring  $activeLanguage= ''

Active content language for this object

Details
Type
string
Propertypublic\ezpContentFieldSet  $fields= ''

Content (object) attributes

Details
Type
\ezpContentFieldSet
Propertypublic\ezpContentLocationSet  $locations= ''

Content locations

Details
Type
\ezpContentLocationSet
Propertyprotected\eZContentObject  $object= ''

Actual content object

Details
Type
\eZContentObject

Methods

methodpublic__get(  $property ) : void

Parameters
Name Type Description
$property
methodpubliccreate( string $contentType ) : \ezpContent
static

Instanciates a new content item

Parameters
Name Type Description
$contentType string

The content class (article, folder, etc)

Returns
Type Description
\ezpContent
methodpublicfromNode( \eZContentObjectTreeNode $node,  $checkAccess = true ) : \ezpContent
static

Instanciates an ezpContent from an eZContentObjectTreeNode

Parameters
Name Type Description
$node \eZContentObjectTreeNode
$checkAccess
Returns
Type Description
\ezpContent
methodpublicfromNodeId( int $nodeId,  $checkAccess = true ) : \ezpContent
static

Instanciates an ezpContent from an eZContentObjectTreenode Id

Parameters
Name Type Description
$nodeId int
$checkAccess
Returns
Type Description
\ezpContent
methodpublicfromObject(  $object,  $checkAccess = true ) : \ezpContent
static

Instanciates an ezpContent from an eZContentObject

Parameters
Name Type Description
$object
$checkAccess
Returns
Type Description
\ezpContent
methodpublicfromObjectId( int $objectId,  $checkAccess = true ) : \ezpContent
static

Instanciates an ezpContent from an eZContentObject Id

Parameters
Name Type Description
$objectId int
$checkAccess
Returns
Type Description
\ezpContent
methodpublicsetActiveLanguage(  $language ) : void

Sets the currently active language for attributes handling

Parameters
Name Type Description
$language
Documentation was generated by DocBlox 0.18.1.