eZPublish  3.8
eZContentObjectAttribute Class Reference

Encapsulates the data for an object attribute. More...

+ Inheritance diagram for eZContentObjectAttribute:
+ Collaboration diagram for eZContentObjectAttribute:

Public Member Functions

classContent ()
 
classDisplayInfo ()
 
 clone ($newVersionNumber, $currentVersionNumber, $contentObjectID=false, $newLanguageCode=false)
 
 collectInformation (&$collection, &$collectionAttribute, &$http, $base)
 
content ()
 
contentActionList ()
 
contentClassAttribute ()
 
contentClassAttributeCanTranslate ()
 
contentClassAttributeIdentifier ()
 
contentClassAttributeIsInformationCollector ()
 
contentClassAttributeIsRequired ()
 
contentClassAttributeName ()
 
 create ($contentclassAttributeID, $contentobjectID, $version=1, $languageCode=false)
 
 customHTTPAction (&$http, $action, $parameters=array())
 
 dataType ()
 
 definition ()
 
displayInfo ()
 
editTemplate ()
 
editTemplateName ()
 
 eZContentObjectAttribute ($row)
 
 fetch ($id, $version, $asObject=true, $field_filters=null)
 
 fetchAttributeTranslations ($asObject=true)
 
 fetchByClassAttributeID ($classAttributeID, $objectID, $version, $languageID, $asObject=true)
 
 fetchByIdentifier ($identifier, $asObject=true)
 Fetch a node by identifier (unique data_text ) More...
 
 fetchInput (&$http, $base)
 
fetchListByClassID ($id, $version=false, $limit=null, $asObject=true, $asCount=false)
 
 fetchSameClassAttributeIDList ($contentClassAttributeID, $asObject=true, $version=false, $contentObjectID=false)
 
 fixupInput (&$http, $base)
 
 generateValidationErrorText ($numargs, $argList)
 
 handleCustomHTTPActions (&$http, $attributeDataBaseName, $customActionAttributeArray, $customActionParameters)
 
 handleDownload (&$object, $objectVersion, $objectLanguage)
 
hasContent ()
 
hasHTTPValue ()
 
 hasStoredFileInformation (&$object, $objectVersion, $objectLanguage)
 
hasValidationError ()
 
informationTemplate ()
 
 initialize ($currentVersion=null, $originalContentObjectAttribute=null)
 
inputParameters ()
 
 insertHTTPFile (&$object, $objectVersion, $objectLanguage, &$httpFile, $mimeData, &$result)
 
 insertRegularFile (&$object, $objectVersion, $objectLanguage, $filePath, &$result)
 
 insertSimpleString (&$object, $objectVersion, $objectLanguage, $string, &$result)
 
isA ()
 
language ($languageCode=false, $asObject=true)
 
 metaData ()
 
object ()
 
objectVersion ()
 
 onPublish (&$object, &$nodes)
 
 postInitialize ($currentVersion=null, $originalContentObjectAttribute=null)
 
 postUnserialize (&$package)
 
 remove ($id, $currentVersion=null)
 
resultTemplate ()
 
 serialize (&$package)
 
 setContent (&$content)
 
 setContentClassAttributeCanTranslate ($canTranslate)
 
 setContentClassAttributeIdentifier ($identifier)
 
 setContentClassAttributeName ($name)
 
 setHasValidationError ($hasError=true)
 
 setHTTPValue (&$value)
 
 setInputParameters (&$parameters)
 
 setValidationError ()
 
 setValidationLog ($text)
 
 setValidationParameters (&$parameters)
 
 store ()
 
 storeData ()
 
 storedFileInformation (&$object, $objectVersion, $objectLanguage)
 
 storeNewRow ()
 
 title ()
 
translateTo ($languageCode, $updateLanguageMask=true)
 
 unserialize (&$package, $attributeDOMNode)
 
 unsetInputParameters ()
 
 unsetValidationParameters ()
 
 updateSortKey ($storeData=true)
 
 validateInformation (&$http, $base, &$inputParameters, $validationParameters=array())
 
 validateInput (&$http, $base, &$inputParameters, $validationParameters=array())
 
 validateIsRequired ()
 
validationError ()
 
validationLog ()
 
validationParameters ()
 
value ()
 
viewTemplate ()
 
viewTemplateName ()
 
- Public Member Functions inherited from eZPersistentObject
attribute ($attr, $noFunction=false)
 
 attributes ()
 
 conditionText (&$conditions)
 
conditionTextByRow (&$conditions, &$row)
 
 definition ()
 
escapeArray (&$array)
 
 eZPersistentObject ($row)
 
 fetchObject (&$def, $field_filters, $conds, $asObject=true, $grouping=null, $custom_fields=null)
 
 fetchObjectList (&$def, $field_filters=null, $conds=null, $sorts=null, $limit=null, $asObject=true, $grouping=false, $custom_fields=null)
 
 fill (&$row)
 
 getShortAttributeName (&$db, &$def, $attrName)
 
 handleRows (&$rows, $class_name, $asObject)
 
 hasAttribute ($attr)
 
 hasDirtyData ()
 
 newObjectOrder (&$def, $orderField, $conditions)
 
 remove ($conditions=null, $extraConditions=null)
 
 removeObject (&$def, $conditions=null, $extraConditions=null)
 
 reorderObject (&$def, $orderField, $conditions, $down=true)
 
 setAttribute ($attr, $val)
 
 setHasDirtyData ($hasDirtyData)
 
 store ($fieldFilters=null)
 
 swapRow ($table, &$keys, &$order_id, &$rows, $id1, $id2)
 
 sync ($fieldFilters=null)
 
 updateObjectList ($parameters)
 

Static Public Member Functions

 metaDataArray (&$attributes)
 

Public Attributes

 $Content
 Contains the content for this attribute. More...
 
 $ContentClassAttributeCanTranslate
 
 $ContentClassAttributeID
 
 $ContentClassAttributeIdentifier
 
 $ContentClassAttributeIsInformationCollector
 
 $ContentClassAttributeIsRequired
 
 $ContentClassAttributeName
 
 $DisplayInfo
 Contains information on how to display the current attribute in various viewmodes. More...
 
 $HTTPValue
 Contains the value(s) submitted in HTTP form. More...
 
 $IsValid
 Stores the is valid. More...
 
 $ValidationError
 Contains the last validation error. More...
 
 $ValidationLog
 Contains the last validation error. More...
 

Detailed Description

Encapsulates the data for an object attribute.

See Also
eZContentObject eZContentClass eZContentClassAttribute

Member Function Documentation

& eZContentObjectAttribute::classContent ( )
Returns
the content for the contentclass attribute which defines this contentobject attribute.
Note
The reference for the return value is required to workaround a bug with PHP references.
& eZContentObjectAttribute::classDisplayInfo ( )
Returns
Information on how to display the class attribute. See eZDataType::classDisplayInformation() for more information on what is returned.
Note
This is a copy of eZContentClassAttribute::displayInfo()
eZContentObjectAttribute::clone (   $newVersionNumber,
  $currentVersionNumber,
  $contentObjectID = false,
  $newLanguageCode = false 
)

Clones the attribute with new version $newVersionNumber and old version $currentVersionNumber.

Note
The cloned attribute is not stored.
eZContentObjectAttribute::collectInformation ( $collection,
$collectionAttribute,
$http,
  $base 
)

Collects the information entered by the user from http post vars

& eZContentObjectAttribute::content ( )

Returns the content for this attribute.

Referenced by value().

& eZContentObjectAttribute::contentActionList ( )

Returns the content action(s) for this attribute

& eZContentObjectAttribute::contentClassAttribute ( )

Returns the attribute for the current data attribute instance

Referenced by classContent(), classDisplayInfo(), contentActionList(), initialize(), postInitialize(), store(), storeData(), updateSortKey(), validateIsRequired(), and viewTemplateName().

& eZContentObjectAttribute::contentClassAttributeCanTranslate ( )
Returns
the cached value if the attribute can be translated or not
Note
The reference for the return value is required to workaround a bug with PHP references.
& eZContentObjectAttribute::contentClassAttributeIdentifier ( )
Returns
the idenfifier for the content class attribute
Note
The reference for the return value is required to workaround a bug with PHP references.
& eZContentObjectAttribute::contentClassAttributeIsInformationCollector ( )
Returns
the cached value of the is_informationcollector value
Note
The reference for the return value is required to workaround a bug with PHP references.
& eZContentObjectAttribute::contentClassAttributeIsRequired ( )
Returns
the cached value of the IsRequired value
Note
The reference for the return value is required to workaround a bug with PHP references.
& eZContentObjectAttribute::contentClassAttributeName ( )
Returns
the cached value of the class attribute name
Note
The reference for the return value is required to workaround a bug with PHP references.
eZContentObjectAttribute::create (   $contentclassAttributeID,
  $contentobjectID,
  $version = 1,
  $languageCode = false 
)
eZContentObjectAttribute::customHTTPAction ( $http,
  $action,
  $parameters = array() 
)

Executes the custom HTTP action

& eZContentObjectAttribute::displayInfo ( )
Returns
Information on how to display the current attribute. See eZDataType::objectDisplayInformation() for more information on what is returned.
& eZContentObjectAttribute::editTemplate ( )
Returns
the template name to use for editing the attribute.
Note
The returned template name does not include the .tpl extension.
See Also
viewTemplate, informationTemplate

Referenced by editTemplateName().

& eZContentObjectAttribute::editTemplateName ( )
Returns
the template name to use for editing the attribute.
eZContentObjectAttribute::eZContentObjectAttribute (   $row)

Referenced by create().

eZContentObjectAttribute::fetchAttributeTranslations (   $asObject = true)
Returns
the attributes with alternative translations for the current attribute version and class attribute id
eZContentObjectAttribute::fetchByClassAttributeID (   $classAttributeID,
  $objectID,
  $version,
  $languageID,
  $asObject = true 
)
eZContentObjectAttribute::fetchByIdentifier (   $identifier,
  $asObject = true 
)

Fetch a node by identifier (unique data_text )

Parameters
identifier
Returns
object attribute

Referenced by eZContentFunctionCollection\fetchObjectByAttribute().

eZContentObjectAttribute::fetchInput ( $http,
  $base 
)

Fetches the data from http post vars and sets them correctly.

& eZContentObjectAttribute::fetchListByClassID (   $id,
  $version = false,
  $limit = null,
  $asObject = true,
  $asCount = false 
)
eZContentObjectAttribute::fetchSameClassAttributeIDList (   $contentClassAttributeID,
  $asObject = true,
  $version = false,
  $contentObjectID = false 
)

Fetches all contentobject attributes which relates to the contentclass attribute $contentClassAttributeID.

Returns
An array with contentobject attributes.
Parameters
$contentClassAttributeIDThe ID of the contentclass attribute
$asObjectIf true objects will be returned, otherwise associative arrays are returned.
$versionThe version the of contentobject attributes to fetch or all version if false.
$contentObjectIDThe ID the of contentobject to fetch or all objects if false.

Referenced by eZImageType\repairContentObjectAttribute().

eZContentObjectAttribute::fixupInput ( $http,
  $base 
)

Tries to fixup the input text to be acceptable.  

eZContentObjectAttribute::generateValidationErrorText (   $numargs,
  $argList 
)

Referenced by setValidationError().

eZContentObjectAttribute::handleCustomHTTPActions ( $http,
  $attributeDataBaseName,
  $customActionAttributeArray,
  $customActionParameters 
)

Sends custom actions to datatype for custom handling.

eZContentObjectAttribute::handleDownload ( $object,
  $objectVersion,
  $objectLanguage 
)

Calls handleDownload() on the current datatype and returns the result.

& eZContentObjectAttribute::hasContent ( )
Returns
true if the attribute is considered to have any content at all (ie. non-empty).

It will call the hasObjectAttributeContent() for the current datatype to figure this out.

Note
The reference for the return value is required to workaround a bug with PHP references.
& eZContentObjectAttribute::hasHTTPValue ( )
Returns
true if the attribute has relavant value(s) submitted in HTTP form.
Note
The reference for the return value is required to workaround a bug with PHP references.
eZContentObjectAttribute::hasStoredFileInformation ( $object,
  $objectVersion,
  $objectLanguage 
)

Calls hasStoredFileInformation() on the current datatype and returns the result.

& eZContentObjectAttribute::hasValidationError ( )
Note
The reference for the return value is required to workaround a bug with PHP references.
& eZContentObjectAttribute::informationTemplate ( )
Returns
the template name to use for information collection for the attribute.
Note
The returned template name does not include the .tpl extension.
See Also
viewTemplate, editTemplate

Referenced by viewTemplateName().

eZContentObjectAttribute::initialize (   $currentVersion = null,
  $originalContentObjectAttribute = null 
)

Initialized the attribute by using the datatype.

Note
Transaction unsafe. If you call several transaction unsafe methods you must enclose the calls within a db transaction; thus within db->begin and db->commit.
& eZContentObjectAttribute::inputParameters ( )
Returns
the current input parameters or false if no parameters has been set.
See Also
setInputParameters, unsetInputParameters
eZContentObjectAttribute::insertHTTPFile ( $object,
  $objectVersion,
  $objectLanguage,
$httpFile,
  $mimeData,
$result 
)

Inserts the HTTP file $httpFile to the content object attribute $objectAttribute by calling eZDataType::insertHTTPFile on the current datatype.

The parameters are passed directly to the datatype with the exception of $object, $objectVersion and $objectLanguage. If false is passed to any of these parameters they will be fetched from the current attribute, if these are available it is adviced to pass them since it will save time.

eZContentObjectAttribute::insertRegularFile ( $object,
  $objectVersion,
  $objectLanguage,
  $filePath,
$result 
)

Inserts the file named $filePath to the content object attribute $objectAttribute. by calling eZDataType::insertRegularFile on the current datatype.

The parameters are passed directly to the datatype with the exception of $object, $objectVersion and $objectLanguage. If false is passed to any of these parameters they will be fetched from the current attribute, if these are available it is adviced to pass them since it will save time.

eZContentObjectAttribute::insertSimpleString ( $object,
  $objectVersion,
  $objectLanguage,
  $string,
$result 
)

Inserts the string $string to the content object attribute $objectAttribute. by calling eZDataType::insertSimpleString on the current datatype.

The parameters are passed directly to the datatype with the exception of $object, $objectVersion and $objectLanguage. If false is passed to any of these parameters they will be fetched from the current attribute, if these are available it is adviced to pass them since it will save time.

& eZContentObjectAttribute::isA ( )
& eZContentObjectAttribute::language (   $languageCode = false,
  $asObject = true 
)
eZContentObjectAttribute::metaData ( )

Returns the metadata. This is the pure content of the attribute used for indexing data for search engines.

eZContentObjectAttribute::metaDataArray ( $attributes)
static

Goes trough all attributes and fetches metadata for the ones that is searchable.

Returns
an array with metadata information.

Referenced by eZObjectRelationType\metaData(), and eZObjectRelationListType\metaData().

& eZContentObjectAttribute::objectVersion ( )
eZContentObjectAttribute::onPublish ( $object,
$nodes 
)
Note
Transaction unsafe. If you call several transaction unsafe methods you must enclose the calls within a db transaction; thus within db->begin and db->commit.
eZContentObjectAttribute::postInitialize (   $currentVersion = null,
  $originalContentObjectAttribute = null 
)

Initialized the attribute by using the datatype after the actual attribute is stored.

eZContentObjectAttribute::postUnserialize ( $package)
eZContentObjectAttribute::remove (   $id,
  $currentVersion = null 
)

Remove the attribute by using the datatype.

Note
Transaction unsafe. If you call several transaction unsafe methods you must enclose the calls within a db transaction; thus within db->begin and db->commit.
& eZContentObjectAttribute::resultTemplate ( )
Returns
the template name to use for information collection result view for the attribute.
Note
The returned template name does not include the .tpl extension.
See Also
viewTemplate, editTemplate, informationTemplate
eZContentObjectAttribute::serialize ( $package)
eZContentObjectAttribute::setContent ( $content)

Sets the content for the current attribute

eZContentObjectAttribute::setContentClassAttributeCanTranslate (   $canTranslate)

Sets the cached content class attribute can_translate

eZContentObjectAttribute::setContentClassAttributeIdentifier (   $identifier)

Sets the cached content class attribute identifier

eZContentObjectAttribute::setContentClassAttributeName (   $name)

Sets the cached content class attribute name

eZContentObjectAttribute::setHasValidationError (   $hasError = true)
eZContentObjectAttribute::setHTTPValue ( $value)

Sets the content of variable for the content of the relevant value(s) submitted in HTTP form.

eZContentObjectAttribute::setInputParameters ( $parameters)

Sets the current input parameters to $parameters. The input parameters are set by validateInput() and made avaiable to datatypes trough the function inputParameters().

Note
The input parameters will only be available for the duration of validateInput().
See Also
inputParameters

Referenced by validateInformation(), and validateInput().

eZContentObjectAttribute::setValidationError ( )
eZContentObjectAttribute::setValidationLog (   $text)
eZContentObjectAttribute::setValidationParameters ( $parameters)

Sets the current validation parameters to $parameters. The validation parameters are set by validateInput() and made avaiable to datatypes trough the function validationParameters().

Note
The validation parameters will only be available for the duration of validateInput().
See Also
validationParameters

Referenced by validateInformation(), and validateInput().

eZContentObjectAttribute::store ( )
Note
Transaction unsafe. If you call several transaction unsafe methods you must enclose the calls within a db transaction; thus within db->begin and db->commit.

Referenced by postUnserialize().

eZContentObjectAttribute::storeData ( )

Similar to store() but does not call eZDataType::storeObjectAttribute().

If you have some datatype code that needs to store attribute data you should call this instead of store(), this function will avoid infinite recursion.

Note
Transaction unsafe. If you call several transaction unsafe methods you must enclose the calls within a db transaction; thus within db->begin and db->commit.
eZContentObjectAttribute::storedFileInformation ( $object,
  $objectVersion,
  $objectLanguage 
)

Calls storedFileInformation() on the current datatype and returns the result.

eZContentObjectAttribute::storeNewRow ( )

Store one row into content attribute table

Note
Transaction unsafe. If you call several transaction unsafe methods you must enclose the calls within a db transaction; thus within db->begin and db->commit.
eZContentObjectAttribute::title ( )

Fetches the title of the data instance which is to form the title of the object.

& eZContentObjectAttribute::translateTo (   $languageCode,
  $updateLanguageMask = true 
)

Clones the attribute to the translation $languageCode.

Note
The cloned attribute is not stored.
Transaction unsafe. If you call several transaction unsafe methods you must enclose the calls within a db transaction; thus within db->begin and db->commit.
Deprecated.
eZContentObjectAttribute::unserialize ( $package,
  $attributeDOMNode 
)
eZContentObjectAttribute::unsetInputParameters ( )

Unsets the input parameters previously set by setInputParameters().

See Also
inputParameters

Referenced by validateInformation(), and validateInput().

eZContentObjectAttribute::unsetValidationParameters ( )

Unsets the validation parameters previously set by setValidationParameters().

See Also
validationParameters

Referenced by validateInformation(), and validateInput().

eZContentObjectAttribute::updateSortKey (   $storeData = true)

Copies the sort key value from the attribute according to the datatype rules.

Note
The attribute is not stored
Transaction unsafe. If you call several transaction unsafe methods you must enclose the calls within a db transaction; thus within db->begin and db->commit.

Referenced by store(), and storeData().

eZContentObjectAttribute::validateInformation ( $http,
  $base,
$inputParameters,
  $validationParameters = array() 
)

Validates the information collection data.  

eZContentObjectAttribute::validateInput ( $http,
  $base,
$inputParameters,
  $validationParameters = array() 
)

Validates the data contents, returns true on success false if the data does not validate.

eZContentObjectAttribute::validateIsRequired ( )
Returns
true if 'is_required' validation should be done otherwise false;
& eZContentObjectAttribute::validationError ( )
Note
The reference for the return value is required to workaround a bug with PHP references.
& eZContentObjectAttribute::validationLog ( )
Note
The reference for the return value is required to workaround a bug with PHP references.
& eZContentObjectAttribute::validationParameters ( )
Returns
the current validation parameters or false if no parameters has been set.
See Also
setValidationParameters, unsetValidationParameters

Referenced by validateIsRequired().

& eZContentObjectAttribute::value ( )

Returns the content of the relevant value(s) submitted in HTTP form.

& eZContentObjectAttribute::viewTemplate ( )
Returns
the template name to use for viewing the attribute.
Note
The returned template name does not include the .tpl extension.
See Also
editTemplate, informationTemplate

Referenced by viewTemplateName().

& eZContentObjectAttribute::viewTemplateName ( )
Returns
the template name to use for viewing the attribute or if the attribute is an information collector the information template name is returned.
Note
The returned template name does not include the .tpl extension.
See Also
editTemplate, informationTemplate

Member Data Documentation

eZContentObjectAttribute::$Content

Contains the content for this attribute.

Referenced by content().

eZContentObjectAttribute::$ContentClassAttributeCanTranslate
eZContentObjectAttribute::$ContentClassAttributeID
eZContentObjectAttribute::$ContentClassAttributeIdentifier
eZContentObjectAttribute::$ContentClassAttributeIsInformationCollector
eZContentObjectAttribute::$ContentClassAttributeIsRequired
eZContentObjectAttribute::$ContentClassAttributeName
eZContentObjectAttribute::$DisplayInfo

Contains information on how to display the current attribute in various viewmodes.

Referenced by displayInfo().

eZContentObjectAttribute::$HTTPValue

Contains the value(s) submitted in HTTP form.

Referenced by value().

eZContentObjectAttribute::$IsValid

Stores the is valid.

Referenced by validateInformation(), and validateInput().

eZContentObjectAttribute::$ValidationError

Contains the last validation error.

Referenced by validationError().

eZContentObjectAttribute::$ValidationLog

Contains the last validation error.

Referenced by validationLog().


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