eZPublishCommunityProject(LegacyStack)  2013.9
ezpContentFieldSet Class Reference
+ Inheritance diagram for ezpContentFieldSet:
+ Collaboration diagram for ezpContentFieldSet:

Public Member Functions

 __construct ()
 Initializes the fields set with a content object + language. More...
 
 __get ($name)
 Getter. More...
 
 __isset ($name)
 Used to check if an attribute has content: if ( isset( $content->fields->title ) ) <= no title More...
 
 __set ($name, eZContentObjectAttribute $value)
 Setter. More...
 
 current ()
 Iterator::current() More...
 
 key ()
 Iterator::key() More...
 
 next ()
 Iterator::next() More...
 
 offsetExists ($offset)
 Array exists handler. More...
 
 offsetGet ($offset)
 Array get handler. More...
 
 offsetSet ($offset, $value)
 Array set hander. More...
 
 offsetUnset ($offset)
 Unset array handler. More...
 
 rewind ()
 Iterator::rewind() More...
 
 setActiveLanguage ($language)
 Sets the currently active language when reading attribute(/object/node) properties. More...
 
 valid ()
 Iterator::valid() More...
 

Static Public Member Functions

static fromContentObject (eZContentObject $contentObject)
 Initializes a level one ezpContentFieldSet from an eZContentObject. More...
 
static fromDataMap ($dataMap)
 Initializes a level two ezpContentFieldSet from a content object data map. More...
 

Protected Member Functions

 initIterator ()
 Initializes the iterator based on the current field / languages list. More...
 

Protected Attributes

 $activeLanguage = false
 
 $childrenFieldSets
 
 $fields
 Fields set content object attributes array( identifier => eZContentObjectAttribute ) More...
 
 $iteratorData = null
 
 $iteratorPointer = null
 
 $parentFieldSet
 

Constructor & Destructor Documentation

ezpContentFieldSet::__construct ( )

Initializes the fields set with a content object + language.

Parameters
int$contentObjectID
string$localeIf not provided, uses the default one for the active siteaccess

Member Function Documentation

ezpContentFieldSet::__get (   $name)

Getter.

Used to get attributes values.

Returns
mixed
ezpContentFieldSet::__isset (   $name)

Used to check if an attribute has content: if ( isset( $content->fields->title ) ) <= no title

See Also
ezContentObjectAttribute->hasContent()
ezpContentFieldSet::__set (   $name,
eZContentObjectAttribute  $value 
)

Setter.

Used to set attributes values.

ezpContentFieldSet::current ( )

Iterator::current()

Referenced by fromContentObject(), key(), and valid().

static ezpContentFieldSet::fromContentObject ( eZContentObject  $contentObject)
static

Initializes a level one ezpContentFieldSet from an eZContentObject.

Parameters
eZContentObject$contentObject
Returns
ezpContentFieldSet

Referenced by ezpContent\fromNode(), and ezpContent\fromObject().

static ezpContentFieldSet::fromDataMap (   $dataMap)
static

Initializes a level two ezpContentFieldSet from a content object data map.

Parameters
array$dataMap
Returns
ezpContentFieldSet

Referenced by fromContentObject().

ezpContentFieldSet::initIterator ( )
protected

Initializes the iterator based on the current field / languages list.

Referenced by setActiveLanguage().

ezpContentFieldSet::key ( )

Iterator::key()

ezpContentFieldSet::next ( )

Iterator::next()

ezpContentFieldSet::offsetExists (   $offset)

Array exists handler.

Can be used to check for existence of a language

Again, this operation might not belong to the fields set (data map) but to the content itself

ezpContentFieldSet::offsetGet (   $offset)

Array get handler.

Will return the requested language's ezpFieldSet

Returns
ezpContentFieldSet
ezpContentFieldSet::offsetSet (   $offset,
  $value 
)

Array set hander.

Will set the requested language's ezpFieldSet. Is that any good ? Might be used to enable a language on a content item: $article->fields['fre-FR'] = true Semantically speaking, this belongs to the content, not the fields. Maybe no need to implement that.

ezpContentFieldSet::offsetUnset (   $offset)

Unset array handler.

Should we allow a user to remove a language by using that syntax: unset( $content->fields['eng-GB'] );

ezpContentFieldSet::rewind ( )

Iterator::rewind()

ezpContentFieldSet::setActiveLanguage (   $language)

Sets the currently active language when reading attribute(/object/node) properties.

Parameters
string$languageLanguage locale (xxx-XX)
Returns
void
ezpContentFieldSet::valid ( )

Iterator::valid()

Member Data Documentation

ezpContentFieldSet::$activeLanguage = false
protected

Referenced by __get(), and initIterator().

ezpContentFieldSet::$childrenFieldSets
protected
ezpContentFieldSet::$fields
protected

Fields set content object attributes array( identifier => eZContentObjectAttribute )

Referenced by initIterator().

ezpContentFieldSet::$iteratorData = null
protected
ezpContentFieldSet::$iteratorPointer = null
protected
ezpContentFieldSet::$parentFieldSet
protected

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