eZ Publish  [trunk]
eZStringType Class Reference

A content datatype which handles text lines. More...

+ Inheritance diagram for eZStringType:
+ Collaboration diagram for eZStringType:

List of all members.

Public Member Functions

 batchInitializeObjectAttributeData ($classAttribute)
 diff ($old, $new, $options=false)
 eZStringType ()
 fetchClassAttributeHTTPInput ($http, $base, $classAttribute)
 fetchCollectionAttributeHTTPInput ($collection, $collectionAttribute, $http, $base, $contentObjectAttribute)
 fetchObjectAttributeHTTPInput ($http, $base, $contentObjectAttribute)
 fixupClassAttributeHTTPInput ($http, $base, $classAttribute)
 fromString ($contentObjectAttribute, $string)
 hasObjectAttributeContent ($contentObjectAttribute)
 initializeObjectAttribute ($contentObjectAttribute, $currentVersion, $originalContentObjectAttribute)
 insertSimpleString ($object, $objectVersion, $objectLanguage, $objectAttribute, $string, &$result)
 isIndexable ()
 isInformationCollector ()
 isSimpleStringInsertionSupported ()
 metaData ($contentObjectAttribute)
 objectAttributeContent ($contentObjectAttribute)
 serializeContentClassAttribute ($classAttribute, $attributeNode, $attributeParametersNode)
 sortKey ($contentObjectAttribute)
 sortKeyType ()
 storeClassAttribute ($attribute, $version)
 storeDefinedClassAttribute ($attribute)
 storeObjectAttribute ($attribute)
 supportsBatchInitializeObjectAttribute ()
 title ($contentObjectAttribute, $name=null)
 toString ($contentObjectAttribute)
 unserializeContentClassAttribute ($classAttribute, $attributeNode, $attributeParametersNode)
 validateClassAttributeHTTPInput ($http, $base, $classAttribute)
 validateCollectionAttributeHTTPInput ($http, $base, $contentObjectAttribute)
 validateObjectAttributeHTTPInput ($http, $base, $contentObjectAttribute)
 validateStringHTTPInput ($data, $contentObjectAttribute, $classAttribute)

Public Attributes

 $MaxLenValidator
 The max len validator.
const DATA_TYPE_STRING = 'ezstring'
const DEFAULT_STRING_FIELD = "data_text1"
const DEFAULT_STRING_VARIABLE = "_ezstring_default_value_"
const MAX_LEN_FIELD = 'data_int1'
const MAX_LEN_VARIABLE = '_ezstring_max_string_length_'

Detailed Description

A content datatype which handles text lines.

It provides the functionality to work as a text line and handles class definition input, object definition input and object viewing.

It uses the spare field data_text in a content object attribute for storing the attribute data.

Definition at line 26 of file ezstringtype.php.


Member Function Documentation

Reimplemented from eZDataType.

Definition at line 366 of file ezstringtype.php.

eZStringType::diff ( old,
new,
options = false 
)

Method used by content diff system to retrieve changes in attributes. This method implements the default behaviour, which is to show old and new version values of the object.

Reimplemented from eZDataType.

Definition at line 352 of file ezstringtype.php.

Initializes with a string id and a description.

Definition at line 37 of file ezstringtype.php.

eZStringType::fetchClassAttributeHTTPInput ( http,
base,
classAttribute 
)

Fetches the HTTP input for the content class attribute.

Note:
Default implementation does nothing.

Reimplemented from eZDataType.

Definition at line 246 of file ezstringtype.php.

eZStringType::fetchCollectionAttributeHTTPInput ( collection,
collectionAttribute,
http,
base,
contentObjectAttribute 
)

Fetches the http post variables for collected information

Reimplemented from eZDataType.

Definition at line 163 of file ezstringtype.php.

eZStringType::fetchObjectAttributeHTTPInput ( http,
base,
contentObjectAttribute 
)

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

Reimplemented from eZDataType.

Definition at line 149 of file ezstringtype.php.

eZStringType::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 234 of file ezstringtype.php.

eZStringType::fromString ( contentObjectAttribute,
string 
)

Reimplemented from eZDataType.

Definition at line 288 of file ezstringtype.php.

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

Reimplemented from eZDataType.

Definition at line 302 of file ezstringtype.php.

eZStringType::initializeObjectAttribute ( contentObjectAttribute,
currentVersion,
originalContentObjectAttribute 
)

Sets the default value.

Reimplemented from eZDataType.

Definition at line 48 of file ezstringtype.php.

eZStringType::insertSimpleString ( object,
objectVersion,
objectLanguage,
objectAttribute,
string,
&$  result 
)

Inserts the string $string in the 'data_text' database field.

Reimplemented from eZDataType.

Definition at line 193 of file ezstringtype.php.

Returns:
true if the datatype can be indexed

Reimplemented from eZDataType.

Definition at line 307 of file ezstringtype.php.

Returns:
true if the datatype can be used as an information collector

Reimplemented from eZDataType.

Definition at line 312 of file ezstringtype.php.

Simple string insertion is supported.

Reimplemented from eZDataType.

Definition at line 185 of file ezstringtype.php.

eZStringType::metaData ( contentObjectAttribute)

Returns the meta data used for storing search indeces.

Reimplemented from eZDataType.

Definition at line 275 of file ezstringtype.php.

eZStringType::objectAttributeContent ( contentObjectAttribute)

Returns the content.

Reimplemented from eZDataType.

Definition at line 267 of file ezstringtype.php.

eZStringType::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 328 of file ezstringtype.php.

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

Reimplemented from eZDataType.

Definition at line 317 of file ezstringtype.php.

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

Reimplemented from eZDataType.

Definition at line 323 of file ezstringtype.php.

eZStringType::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 204 of file ezstringtype.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 208 of file ezstringtype.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 178 of file ezstringtype.php.

Reimplemented from eZDataType.

Definition at line 361 of file ezstringtype.php.

eZStringType::title ( contentObjectAttribute,
name = null 
)

Returns the content of the string for use as a title

Reimplemented from eZDataType.

Definition at line 297 of file ezstringtype.php.

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

Reimplemented from eZDataType.

Definition at line 283 of file ezstringtype.php.

eZStringType::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 344 of file ezstringtype.php.

eZStringType::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 212 of file ezstringtype.php.

eZStringType::validateCollectionAttributeHTTPInput ( http,
base,
objectAttribute 
)

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

Note:
Default implementation does nothing and returns accepted.

Reimplemented from eZDataType.

Definition at line 119 of file ezstringtype.php.

eZStringType::validateObjectAttributeHTTPInput ( http,
base,
objectAttribute 
)

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

Note:
Default implementation does nothing and returns accepted.

Reimplemented from eZDataType.

Definition at line 88 of file ezstringtype.php.

eZStringType::validateStringHTTPInput ( data,
contentObjectAttribute,
classAttribute 
)

Member Data Documentation

eZStringType::$MaxLenValidator

The max len validator.

Definition at line 383 of file ezstringtype.php.

const eZStringType::DATA_TYPE_STRING = 'ezstring'

Definition at line 28 of file ezstringtype.php.

const eZStringType::DEFAULT_STRING_FIELD = "data_text1"

Definition at line 31 of file ezstringtype.php.

const eZStringType::DEFAULT_STRING_VARIABLE = "_ezstring_default_value_"

Definition at line 32 of file ezstringtype.php.

const eZStringType::MAX_LEN_FIELD = 'data_int1'

Definition at line 29 of file ezstringtype.php.

const eZStringType::MAX_LEN_VARIABLE = '_ezstring_max_string_length_'

Definition at line 30 of file ezstringtype.php.


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