eZ Publish  [4.2]
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 46 of file ezstringtype.php.


Member Function Documentation

eZStringType::batchInitializeObjectAttributeData ( classAttribute)

Reimplemented from eZDataType.

Definition at line 386 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 372 of file ezstringtype.php.

eZStringType::eZStringType ( )

Initializes with a string id and a description.

Definition at line 57 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 266 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 183 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 169 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 254 of file ezstringtype.php.

eZStringType::fromString ( contentObjectAttribute,
string 
)

Reimplemented from eZDataType.

Definition at line 308 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 322 of file ezstringtype.php.

eZStringType::initializeObjectAttribute ( contentObjectAttribute,
currentVersion,
originalContentObjectAttribute 
)

Sets the default value.

Reimplemented from eZDataType.

Definition at line 68 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 213 of file ezstringtype.php.

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

Reimplemented from eZDataType.

Definition at line 327 of file ezstringtype.php.

eZStringType::isInformationCollector ( )
Returns:
true if the datatype can be used as an information collector

Reimplemented from eZDataType.

Definition at line 332 of file ezstringtype.php.

eZStringType::isSimpleStringInsertionSupported ( )

Simple string insertion is supported.

Reimplemented from eZDataType.

Definition at line 205 of file ezstringtype.php.

eZStringType::metaData ( contentObjectAttribute)

Returns the meta data used for storing search indeces.

Reimplemented from eZDataType.

Definition at line 295 of file ezstringtype.php.

eZStringType::objectAttributeContent ( contentObjectAttribute)

Returns the content.

Reimplemented from eZDataType.

Definition at line 287 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 348 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 337 of file ezstringtype.php.

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

Reimplemented from eZDataType.

Definition at line 343 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 224 of file ezstringtype.php.

eZStringType::storeDefinedClassAttribute ( classAttribute)
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.

Reimplemented from eZDataType.

Definition at line 228 of file ezstringtype.php.

eZStringType::storeObjectAttribute ( attribute)

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 198 of file ezstringtype.php.

eZStringType::supportsBatchInitializeObjectAttribute ( )

Reimplemented from eZDataType.

Definition at line 381 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 317 of file ezstringtype.php.

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

Reimplemented from eZDataType.

Definition at line 303 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 364 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 232 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 139 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 108 of file ezstringtype.php.

eZStringType::validateStringHTTPInput ( data,
contentObjectAttribute,
classAttribute 
)

Member Data Documentation

eZStringType::$MaxLenValidator

The max len validator.

Definition at line 403 of file ezstringtype.php.

const eZStringType::DATA_TYPE_STRING = 'ezstring'

Definition at line 48 of file ezstringtype.php.

const eZStringType::DEFAULT_STRING_FIELD = "data_text1"

Definition at line 51 of file ezstringtype.php.

const eZStringType::DEFAULT_STRING_VARIABLE = "_ezstring_default_value_"

Definition at line 52 of file ezstringtype.php.

const eZStringType::MAX_LEN_FIELD = 'data_int1'

Definition at line 49 of file ezstringtype.php.

const eZStringType::MAX_LEN_VARIABLE = '_ezstring_max_string_length_'

Definition at line 50 of file ezstringtype.php.


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