eZPublishCommunityProject  2012.12
eZ\Publish\Core\Repository\Values\Content\Content Class Reference
+ Inheritance diagram for eZ\Publish\Core\Repository\Values\Content\Content:
+ Collaboration diagram for eZ\Publish\Core\Repository\Values\Content\Content:

Public Member Functions

 __construct (array $data=array())
 
 __get ($property)
 Magic getter for retrieving convenience properties. More...
 
 __isset ($property)
 Magic isset for singaling existence of convenience properties. More...
 
 getField ($fieldDefIdentifier, $languageCode=null)
 This method returns the field for a given field definition identifier and language. More...
 
 getFields ()
 This method returns the complete fields collection. More...
 
 getFieldsByLanguage ($languageCode=null)
 This method returns the fields for a given language and non translatable fields. More...
 
 getFieldValue ($fieldDefIdentifier, $languageCode=null)
 Returns a field value for the given value $version->fields[$fieldDefId][$languageCode] is an equivalent call if no language is given on a translatable field this method returns the value of the initial language of the version if present, otherwise null. More...
 
 getVersionInfo ()
 Returns the VersionInfo for this version. More...
 
- Public Member Functions inherited from eZ\Publish\API\Repository\Values\Content\Content
 getFields ()
 This method returns the complete fields collection. More...
 
 getFieldsByLanguage ($languageCode=null)
 This method returns the fields for a given language and non translatable fields. More...
 
 getFieldValue ($fieldDefIdentifier, $languageCode=null)
 Returns a field value for the given value $version->fields[$fieldDefId][$languageCode] is an equivalent call if no language is given on a translatable field this method returns the value of the initial language of the version if present, otherwise null. More...
 
 getVersionInfo ()
 Returns the VersionInfo for this version. More...
 
- Public Member Functions inherited from eZ\Publish\API\Repository\Values\ValueObject
 __construct (array $properties=array())
 Construct object optionally with a set of properties. More...
 
 __get ($property)
 Magic get function handling read to non public properties. More...
 
 __isset ($property)
 Magic isset function handling isset() to non public properties. More...
 
 __set ($property, $value)
 Magic set function handling writes to non public properties. More...
 
 __unset ($property)
 Magic unset function handling unset() to non public properties. More...
 
 attribute ($property)
 Internal function for Legacy template engine compatibility to get property value. More...
 
 attributes ()
 Internal function for Legacy template engine compatibility to get properties. More...
 
 hasAttribute ($property)
 Internal function for Legacy template engine compatibility to check existence of property. More...
 

Protected Member Functions

 getProperties ($dynamicProperties=array( 'id', 'contentInfo', 'contentType'))
 Function where list of properties are returned. More...
 
- Protected Member Functions inherited from eZ\Publish\API\Repository\Values\ValueObject
 getProperties ($dynamicProperties=array())
 Function where list of properties are returned. More...
 

Protected Attributes

 $fields
 
 $versionInfo
 

Private Attributes

 $internalFields
 

Additional Inherited Members

- Static Public Member Functions inherited from eZ\Publish\API\Repository\Values\ValueObject
static __set_state (array $array)
 Returns a new instance of this class with the data specified by $array. More...
 

Constructor & Destructor Documentation

eZ\Publish\Core\Repository\Values\Content\Content::__construct ( array  $data = array())

Member Function Documentation

eZ\Publish\Core\Repository\Values\Content\Content::__get (   $property)

Magic getter for retrieving convenience properties.

Parameters
string$propertyThe name of the property to retrieve
Returns
mixed
eZ\Publish\Core\Repository\Values\Content\Content::__isset (   $property)

Magic isset for singaling existence of convenience properties.

Parameters
string$property
Returns
boolean
eZ\Publish\Core\Repository\Values\Content\Content::getField (   $fieldDefIdentifier,
  $languageCode = null 
)

This method returns the field for a given field definition identifier and language.

If not set the initialLanguage of the content version is used.

Parameters
string$fieldDefIdentifier
null$languageCode
Returns
|null A Field or null if nothing is found

Referenced by eZ\Publish\Core\MVC\Symfony\Templating\Twig\Extension\ContentExtension\renderField().

eZ\Publish\Core\Repository\Values\Content\Content::getFields ( )

This method returns the complete fields collection.

Returns
[] An array of Field

Referenced by eZ\Publish\Core\Repository\Values\Content\Content\getField(), and eZ\Publish\Core\Repository\Values\Content\Content\getFieldsByLanguage().

eZ\Publish\Core\Repository\Values\Content\Content::getFieldsByLanguage (   $languageCode = null)

This method returns the fields for a given language and non translatable fields.

If not set the initialLanguage of the content version is used.

Parameters
string$languageCode
Returns
[] An array of Field with field identifier as keys
eZ\Publish\Core\Repository\Values\Content\Content::getFieldValue (   $fieldDefIdentifier,
  $languageCode = null 
)

Returns a field value for the given value $version->fields[$fieldDefId][$languageCode] is an equivalent call if no language is given on a translatable field this method returns the value of the initial language of the version if present, otherwise null.

On non translatable fields this method ignores the languageCode parameter.

Parameters
string$fieldDefIdentifier
string$languageCode
Returns
mixed a primitive type or a field type Value object depending on the field type.
eZ\Publish\Core\Repository\Values\Content\Content::getProperties (   $dynamicProperties = array( 'id', 'contentInfo', 'contentType' ))
protected

Function where list of properties are returned.

Override to add dynamic properties parent::getProperties()

Parameters
array$dynamicProperties
Returns
array

Member Data Documentation

eZ\Publish\Core\Repository\Values\Content\Content::$fields
protected
eZ\Publish\Core\Repository\Values\Content\Content::$internalFields
private
eZ\Publish\Core\Repository\Values\Content\Content::$versionInfo
protected

The documentation for this class was generated from the following file: