eZ Publish  [4.2]
eZObjectRelationType Class Reference

A content datatype which handles object relations. More...

+ Inheritance diagram for eZObjectRelationType:
+ Collaboration diagram for eZObjectRelationType:

List of all members.

Public Member Functions

 classAttributeContent ($classObjectAttribute)
 customClassAttributeHTTPAction ($http, $action, $classAttribute)
 customObjectAttributeHTTPAction ($http, $action, $contentObjectAttribute, $parameters)
 eZObjectRelationType ()
 fetchClassAttributeHTTPInput ($http, $base, $classAttribute)
 fetchObjectAttributeHTTPInput ($http, $base, $contentObjectAttribute)
 fixupClassAttributeHTTPInput ($http, $base, $classAttribute)
 fromString ($contentObjectAttribute, $string)
 hasObjectAttributeContent ($contentObjectAttribute)
 initializeObjectAttribute ($contentObjectAttribute, $currentVersion, $originalContentObjectAttribute)
 isIndexable ()
 metaData ($contentObjectAttribute)
 objectAttributeContent ($contentObjectAttribute)
 objectDisplayInformation ($objectAttribute, $mergeInfo=false)
 postUnserializeContentObjectAttribute ($package, $objectAttribute)
 preStoreClassAttribute ($classAttribute, $version)
 removeRelatedObjectItem ($contentObjectAttribute, $objectID)
 serializeContentClassAttribute ($classAttribute, $attributeNode, $attributeParametersNode)
 serializeContentObjectAttribute ($package, $objectAttribute)
 sortKey ($contentObjectAttribute)
 sortKeyType ()
 storeObjectAttribute ($contentObjectAttribute)
 supportsBatchInitializeObjectAttribute ()
 title ($contentObjectAttribute, $name=null)
 toString ($contentObjectAttribute)
 unserializeContentClassAttribute ($classAttribute, $attributeNode, $attributeParametersNode)
 unserializeContentObjectAttribute ($package, $objectAttribute, $attributeNode)
 validateClassAttributeHTTPInput ($http, $base, $classAttribute)
 validateObjectAttributeHTTPInput ($http, $base, $contentObjectAttribute)

Public Attributes

const DATA_TYPE_STRING = "ezobjectrelation"

Private Member Functions

 fuzzyTextMatch ($text, $match)
 removeContentObjectRelation ($contentObjectAttribute)

Detailed Description

A content datatype which handles object relations.

Definition at line 38 of file ezobjectrelationtype.php.


Member Function Documentation

eZObjectRelationType::classAttributeContent ( classAttribute)

Returns the content data for the given content class attribute.

Reimplemented from eZDataType.

Definition at line 398 of file ezobjectrelationtype.php.

Referenced by objectDisplayInformation().

eZObjectRelationType::customClassAttributeHTTPAction ( http,
action,
classAttribute 
)

Executes a custom action for a class attribute which was defined on the web page.

Note:
Default implementation does nothing.

Reimplemented from eZDataType.

Definition at line 408 of file ezobjectrelationtype.php.

eZObjectRelationType::customObjectAttributeHTTPAction ( http,
action,
objectAttribute,
parameters 
)

Executes a custom action for an object attribute which was defined on the web page.

Note:
Default implementation does nothing.

Reimplemented from eZDataType.

Definition at line 292 of file ezobjectrelationtype.php.

eZObjectRelationType::eZObjectRelationType ( )

Initializes with a string id and a description.

Definition at line 45 of file ezobjectrelationtype.php.

eZObjectRelationType::fetchClassAttributeHTTPInput ( http,
base,
classAttribute 
)

Fetches the HTTP input for the content class attribute.

Note:
Default implementation does nothing.

Reimplemented from eZDataType.

Definition at line 221 of file ezobjectrelationtype.php.

eZObjectRelationType::fetchObjectAttributeHTTPInput ( http,
base,
contentObjectAttribute 
)

Fetches the http post var string input and stores it in the data instance.

Reimplemented from eZDataType.

Definition at line 94 of file ezobjectrelationtype.php.

eZObjectRelationType::fixupClassAttributeHTTPInput ( http,
base,
classAttribute 
)

Tries to do a fixup on the input text so that it's acceptable as class attribute input.

Note:
Default implementation does nothing and returns accepted.

Reimplemented from eZDataType.

Definition at line 217 of file ezobjectrelationtype.php.

eZObjectRelationType::fromString ( contentObjectAttribute,
string 
)

Reimplemented from eZDataType.

Definition at line 489 of file ezobjectrelationtype.php.

eZObjectRelationType::fuzzyTextMatch ( text,
match 
) [private]
Returns:
a number of how near $match is to $text, the lower the better and 0 is a perfect match.
false if it does not match

Definition at line 160 of file ezobjectrelationtype.php.

Referenced by fetchObjectAttributeHTTPInput().

eZObjectRelationType::hasObjectAttributeContent ( contentObjectAttribute)
Returns:
true if the datatype finds any content in the attribute $contentObjectAttribute.

Reimplemented from eZDataType.

Definition at line 516 of file ezobjectrelationtype.php.

eZObjectRelationType::initializeObjectAttribute ( contentObjectAttribute,
currentVersion,
originalContentObjectAttribute 
)

Initializes the class attribute with some data.

Reimplemented from eZDataType.

Definition at line 54 of file ezobjectrelationtype.php.

eZObjectRelationType::isIndexable ( )
Returns:
true if the datatype can be indexed

Reimplemented from eZDataType.

Definition at line 498 of file ezobjectrelationtype.php.

eZObjectRelationType::metaData ( contentObjectAttribute)

Returns the meta data used for storing search indeces.

Reimplemented from eZDataType.

Definition at line 454 of file ezobjectrelationtype.php.

eZObjectRelationType::objectAttributeContent ( contentObjectAttribute)

Returns the content.

Reimplemented from eZDataType.

Definition at line 362 of file ezobjectrelationtype.php.

Referenced by hasObjectAttributeContent(), metaData(), and title().

eZObjectRelationType::objectDisplayInformation ( objectAttribute,
mergeInfo = false 
)

Sets grouped_input to true when browse mode is active or a dropdown with a fuzzy match is used.

Reimplemented from eZDataType.

Definition at line 376 of file ezobjectrelationtype.php.

eZObjectRelationType::postUnserializeContentObjectAttribute ( package,
objectAttribute 
)

Reimplemented from eZDataType.

Definition at line 615 of file ezobjectrelationtype.php.

eZObjectRelationType::preStoreClassAttribute ( classAttribute,
version 
)

Similar to the storeClassAttribute but is called before the attribute itself is stored and can be used to set values in the class attribute.

Returns:
True if the value was stored correctly.
See also:
fetchClassAttributeHTTPInput

Reimplemented from eZDataType.

Definition at line 251 of file ezobjectrelationtype.php.

eZObjectRelationType::removeContentObjectRelation ( contentObjectAttribute) [private]

Delete the old version from ezcontentobject_link if count of translations > 1

Definition at line 263 of file ezobjectrelationtype.php.

Referenced by customObjectAttributeHTTPAction().

eZObjectRelationType::removeRelatedObjectItem ( contentObjectAttribute,
objectID 
)

Removes objects with given ID from the relations list

Reimplemented from eZDataType.

Definition at line 643 of file ezobjectrelationtype.php.

eZObjectRelationType::serializeContentClassAttribute ( classAttribute,
attributeNode,
attributeParametersNode 
)

Adds the necessary dom structure to the attribute parameters.

Note:
The default is to add unsupported='true' to the attribute node, meaning that the datatype does not support serializing.

Reimplemented from eZDataType.

Definition at line 524 of file ezobjectrelationtype.php.

eZObjectRelationType::serializeContentObjectAttribute ( package,
objectAttribute 
)

Export related object's remote_id.

Reimplemented from eZDataType.

Definition at line 567 of file ezobjectrelationtype.php.

eZObjectRelationType::sortKey ( objectAttribute)
Returns:
the sort key for the datatype. This is used for sorting on attribute level.

Reimplemented from eZDataType.

Definition at line 388 of file ezobjectrelationtype.php.

eZObjectRelationType::sortKeyType ( )
Returns:
the type of the sort key int|string False is returned if sorting is not supported

Reimplemented from eZDataType.

Definition at line 393 of file ezobjectrelationtype.php.

eZObjectRelationType::storeObjectAttribute ( contentObjectAttribute)

Stores relation to the ezcontentobject_link table

Reimplemented from eZDataType.

Definition at line 175 of file ezobjectrelationtype.php.

eZObjectRelationType::supportsBatchInitializeObjectAttribute ( )

Reimplemented from eZDataType.

Definition at line 649 of file ezobjectrelationtype.php.

eZObjectRelationType::title ( contentObjectAttribute,
name = null 
)

Returns the content of the string for use as a title

Reimplemented from eZDataType.

Definition at line 506 of file ezobjectrelationtype.php.

eZObjectRelationType::toString ( contentObjectAttribute)
Returns:
string representation of an contentobjectattribute data for simplified export

Reimplemented from eZDataType.

Definition at line 484 of file ezobjectrelationtype.php.

eZObjectRelationType::unserializeContentClassAttribute ( classAttribute,
attributeNode,
attributeParametersNode 
)

Extracts values from the attribute parameters and sets it in the class attribute.

Note:
This function is called after the attribute has been stored and a second store is called after this function is done.

Reimplemented from eZDataType.

Definition at line 542 of file ezobjectrelationtype.php.

eZObjectRelationType::unserializeContentObjectAttribute ( package,
objectAttribute,
attributeNode 
)

Unserialize contentobject attribute

Parameters:
package
objectAttributecontentobject attribute object
attributeNodeezdomnode object

Reimplemented from eZDataType.

Definition at line 592 of file ezobjectrelationtype.php.

eZObjectRelationType::validateClassAttributeHTTPInput ( http,
base,
classAttribute 
)

Validates the input for a class attribute and returns a validation state as defined in eZInputValidator.

Note:
Default implementation does nothing and returns accepted.

Reimplemented from eZDataType.

Definition at line 201 of file ezobjectrelationtype.php.

eZObjectRelationType::validateObjectAttributeHTTPInput ( http,
base,
contentObjectAttribute 
)

Validates the input and returns true if the input was valid for this datatype.

Reimplemented from eZDataType.

Definition at line 67 of file ezobjectrelationtype.php.


Member Data Documentation

const eZObjectRelationType::DATA_TYPE_STRING = "ezobjectrelation"

Definition at line 40 of file ezobjectrelationtype.php.


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