eZ Publish  [trunk]
eZKeywordType Class Reference

A content datatype which handles keyword indexes. More...

+ Inheritance diagram for eZKeywordType:
+ Collaboration diagram for eZKeywordType:

List of all members.

Public Member Functions

 deleteStoredObjectAttribute ($contentObjectAttribute, $version=null)
 eZKeywordType ()
 fetchClassAttributeHTTPInput ($http, $base, $attribute)
 fetchObjectAttributeHTTPInput ($http, $base, $contentObjectAttribute)
 fixupClassAttributeHTTPInput ($http, $base, $attribute)
 fromString ($contentObjectAttribute, $string)
 hasObjectAttributeContent ($contentObjectAttribute)
 initializeObjectAttribute ($contentObjectAttribute, $currentVersion, $originalContentObjectAttribute)
 isIndexable ()
 metaData ($attribute)
 objectAttributeContent ($attribute)
 serializeContentObjectAttribute ($package, $objectAttribute)
 storeClassAttribute ($attribute, $version)
 storeDefinedClassAttribute ($attribute)
 storeObjectAttribute ($attribute)
 supportsBatchInitializeObjectAttribute ()
 title ($attribute, $name=null)
 toString ($contentObjectAttribute)
 Returns string representation of an contentobjectattribute data for simplified export.
 unserializeContentObjectAttribute ($package, $objectAttribute, $attributeNode)
 validateClassAttributeHTTPInput ($http, $base, $attribute)
 validateObjectAttributeHTTPInput ($http, $base, $contentObjectAttribute)

Public Attributes

const DATA_TYPE_STRING = 'ezkeyword'

Detailed Description

A content datatype which handles keyword indexes.

Definition at line 20 of file ezkeywordtype.php.


Member Function Documentation

eZKeywordType::deleteStoredObjectAttribute ( contentObjectAttribute,
version = null 
)

Delete stored object attribute

Reimplemented from eZDataType.

Definition at line 164 of file ezkeywordtype.php.

Initializes with a keyword id and a description.

Definition at line 27 of file ezkeywordtype.php.

eZKeywordType::fetchClassAttributeHTTPInput ( http,
base,
classAttribute 
)

Fetches the HTTP input for the content class attribute.

Note:
Default implementation does nothing.

Reimplemented from eZDataType.

Definition at line 133 of file ezkeywordtype.php.

eZKeywordType::fetchObjectAttributeHTTPInput ( http,
base,
contentObjectAttribute 
)

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

Reimplemented from eZDataType.

Definition at line 89 of file ezkeywordtype.php.

eZKeywordType::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 129 of file ezkeywordtype.php.

eZKeywordType::fromString ( contentObjectAttribute,
string 
)

Reimplemented from eZDataType.

Definition at line 252 of file ezkeywordtype.php.

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

Reimplemented from eZDataType.

Definition at line 224 of file ezkeywordtype.php.

eZKeywordType::initializeObjectAttribute ( contentObjectAttribute,
currentVersion,
originalContentObjectAttribute 
)

Sets the default value.

Reimplemented from eZDataType.

Definition at line 36 of file ezkeywordtype.php.

Returns:
true if the datatype can be indexed

Reimplemented from eZDataType.

Definition at line 233 of file ezkeywordtype.php.

eZKeywordType::metaData ( attribute)

Returns the meta data used for storing search indeces.

Reimplemented from eZDataType.

Definition at line 152 of file ezkeywordtype.php.

Returns the content.

Reimplemented from eZDataType.

Definition at line 141 of file ezkeywordtype.php.

eZKeywordType::serializeContentObjectAttribute ( package,
objectAttribute 
)
Parameters:
package
objectAttributecontent attribute
Returns:
a DOM representation of the content object attribute

Reimplemented from eZDataType.

Definition at line 260 of file ezkeywordtype.php.

eZKeywordType::storeClassAttribute ( classAttribute,
version 
)

Stores the datatype data to the database which is related to the class attribute. The $version parameter determines which version is currently being stored, 0 is the real version while 1 is the temporary version.

Returns:
True if the value was stored correctly.
Note:
The method is entirely up to the datatype, for instance it could reuse the available types in the the attribute or store in a separate object.
This function is called after the attribute data has been stored. If you need to alter attribute data use preStoreClassAttribute instead.
See also:
fetchClassAttributeHTTPInput

Reimplemented from eZDataType.

Definition at line 116 of file ezkeywordtype.php.

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.
Parameters:
eZContentClassAttribute$classAttributeContent class attribute of the datatype

Reimplemented from eZDataType.

Definition at line 120 of file ezkeywordtype.php.

Does nothing since it uses the data_text field in the content object attribute. See fetchObjectAttributeHTTPInput for the actual storing.

Reimplemented from eZDataType.

Definition at line 106 of file ezkeywordtype.php.

Reimplemented from eZDataType.

Definition at line 283 of file ezkeywordtype.php.

eZKeywordType::title ( attribute,
name = null 
)

Returns the content of the keyword for use as a title

Reimplemented from eZDataType.

Definition at line 215 of file ezkeywordtype.php.

eZKeywordType::toString ( contentObjectAttribute)

Returns string representation of an contentobjectattribute data for simplified export.

Parameters:
eZContentObjectAttribute$contentObjectAttribute
Returns:
string

Reimplemented from eZDataType.

Definition at line 245 of file ezkeywordtype.php.

eZKeywordType::unserializeContentObjectAttribute ( package,
objectAttribute,
attributeNode 
)

Unserialize contentobject attribute

Parameters:
package
objectAttributecontentobject attribute object
attributeNodeezdomnode object

Reimplemented from eZDataType.

Definition at line 275 of file ezkeywordtype.php.

eZKeywordType::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 124 of file ezkeywordtype.php.

eZKeywordType::validateObjectAttributeHTTPInput ( http,
base,
contentObjectAttribute 
)

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

Reimplemented from eZDataType.

Definition at line 60 of file ezkeywordtype.php.


Member Data Documentation

const eZKeywordType::DATA_TYPE_STRING = 'ezkeyword'

Definition at line 22 of file ezkeywordtype.php.


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