eZ Publish  [trunk]
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 18 of file ezobjectrelationtype.php.


Member Function Documentation

Returns the content data for the given content class attribute.

Reimplemented from eZDataType.

Definition at line 386 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 396 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 272 of file ezobjectrelationtype.php.

Initializes with a string id and a description.

Definition at line 25 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 201 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 74 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 197 of file ezobjectrelationtype.php.

eZObjectRelationType::fromString ( contentObjectAttribute,
string 
)

Reimplemented from eZDataType.

Definition at line 477 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 140 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 504 of file ezobjectrelationtype.php.

eZObjectRelationType::initializeObjectAttribute ( contentObjectAttribute,
currentVersion,
originalContentObjectAttribute 
)

Initializes the class attribute with some data.

Reimplemented from eZDataType.

Definition at line 34 of file ezobjectrelationtype.php.

Returns:
true if the datatype can be indexed

Reimplemented from eZDataType.

Definition at line 486 of file ezobjectrelationtype.php.

eZObjectRelationType::metaData ( contentObjectAttribute)

Returns the meta data used for storing search indeces.

Reimplemented from eZDataType.

Definition at line 442 of file ezobjectrelationtype.php.

eZObjectRelationType::objectAttributeContent ( contentObjectAttribute)

Returns the content.

Reimplemented from eZDataType.

Definition at line 350 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 364 of file ezobjectrelationtype.php.

eZObjectRelationType::postUnserializeContentObjectAttribute ( package,
objectAttribute 
)

Reimplemented from eZDataType.

Definition at line 603 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 231 of file ezobjectrelationtype.php.

eZObjectRelationType::removeContentObjectRelation ( contentObjectAttribute) [private]

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

Definition at line 243 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 631 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 512 of file ezobjectrelationtype.php.

eZObjectRelationType::serializeContentObjectAttribute ( package,
objectAttribute 
)

Export related object's remote_id.

Reimplemented from eZDataType.

Definition at line 555 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 376 of file ezobjectrelationtype.php.

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

Reimplemented from eZDataType.

Definition at line 381 of file ezobjectrelationtype.php.

eZObjectRelationType::storeObjectAttribute ( contentObjectAttribute)

Stores relation to the ezcontentobject_link table

Reimplemented from eZDataType.

Definition at line 155 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 494 of file ezobjectrelationtype.php.

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

Reimplemented from eZDataType.

Definition at line 472 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 530 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 580 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 181 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 47 of file ezobjectrelationtype.php.


Member Data Documentation

const eZObjectRelationType::DATA_TYPE_STRING = "ezobjectrelation"

Definition at line 20 of file ezobjectrelationtype.php.


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