eZ Publish  [4.2]
eZIntegerType Class Reference

A content datatype which handles integers. More...

+ Inheritance diagram for eZIntegerType:
+ Collaboration diagram for eZIntegerType:

List of all members.

Public Member Functions

 batchInitializeObjectAttributeData ($classAttribute)
 eZIntegerType ()
 fetchClassAttributeHTTPInput ($http, $base, $classAttribute)
 fetchCollectionAttributeHTTPInput ($collection, $collectionAttribute, $http, $base, $contentObjectAttribute)
 fetchObjectAttributeHTTPInput ($http, $base, $contentObjectAttribute)
 fixupClassAttributeHTTPInput ($http, $base, $classAttribute)
 fixupObjectAttributeHTTPInput ($http, $base, $contentObjectAttribute)
 fromString ($contentObjectAttribute, $string)
 hasObjectAttributeContent ($contentObjectAttribute)
 initializeObjectAttribute ($contentObjectAttribute, $currentVersion, $originalContentObjectAttribute)
 isIndexable ()
 isInformationCollector ()
 metaData ($contentObjectAttribute)
 objectAttributeContent ($contentObjectAttribute)
 serializeContentClassAttribute ($classAttribute, $attributeNode, $attributeParametersNode)
 sortKey ($contentObjectAttribute)
 sortKeyType ()
 storeClassAttribute ($attribute, $version)
 storeObjectAttribute ($object_attribute)
 supportsBatchInitializeObjectAttribute ()
 title ($contentObjectAttribute, $name=null)
 toString ($contentObjectAttribute)
 unserializeContentClassAttribute ($classAttribute, $attributeNode, $attributeParametersNode)
 validateClassAttributeHTTPInput ($http, $base, $classAttribute)
 validateCollectionAttributeHTTPInput ($http, $base, $contentObjectAttribute)
 validateIntegerHTTPInput ($data, $contentObjectAttribute, $classAttribute)
 validateObjectAttributeHTTPInput ($http, $base, $contentObjectAttribute)

Public Attributes

 $IntegerValidator
 The integer value validator.
const DATA_TYPE_STRING = "ezinteger"
const DEFAULT_VALUE_FIELD = "data_int3"
const DEFAULT_VALUE_VARIABLE = "_ezinteger_default_value_"
const HAS_MAX_VALUE = 2
const HAS_MIN_MAX_VALUE = 3
const HAS_MIN_VALUE = 1
const INPUT_STATE_FIELD = "data_int4"
const MAX_VALUE_FIELD = "data_int2"
const MAX_VALUE_VARIABLE = "_ezinteger_max_integer_value_"
const MIN_VALUE_FIELD = "data_int1"
const MIN_VALUE_VARIABLE = "_ezinteger_min_integer_value_"
const NO_MIN_MAX_VALUE = 0

Detailed Description

A content datatype which handles integers.

It provides the functionality to work as an integer and handles class definition input, object definition input and object viewing.

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

Definition at line 41 of file ezintegertype.php.


Member Function Documentation

eZIntegerType::batchInitializeObjectAttributeData ( classAttribute)

Reimplemented from eZDataType.

Definition at line 500 of file ezintegertype.php.

eZIntegerType::eZIntegerType ( )

Definition at line 56 of file ezintegertype.php.

eZIntegerType::fetchClassAttributeHTTPInput ( http,
base,
classAttribute 
)

Fetches the HTTP input for the content class attribute.

Note:
Default implementation does nothing.

Reimplemented from eZDataType.

Definition at line 343 of file ezintegertype.php.

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

Fetches the http post variables for collected information

Reimplemented from eZDataType.

Definition at line 238 of file ezintegertype.php.

eZIntegerType::fetchObjectAttributeHTTPInput ( http,
base,
contentObjectAttribute 
)

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

Reimplemented from eZDataType.

Definition at line 194 of file ezintegertype.php.

eZIntegerType::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 320 of file ezintegertype.php.

eZIntegerType::fixupObjectAttributeHTTPInput ( http,
base,
objectAttribute 
)

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

Note:
Default implementation does nothing.

Reimplemented from eZDataType.

Definition at line 163 of file ezintegertype.php.

eZIntegerType::fromString ( contentObjectAttribute,
string 
)

Reimplemented from eZDataType.

Definition at line 413 of file ezintegertype.php.

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

Reimplemented from eZDataType.

Definition at line 426 of file ezintegertype.php.

eZIntegerType::initializeObjectAttribute ( contentObjectAttribute,
currentVersion,
originalContentObjectAttribute 
)

Sets the default value.

Reimplemented from eZDataType.

Definition at line 170 of file ezintegertype.php.

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

Reimplemented from eZDataType.

Definition at line 439 of file ezintegertype.php.

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

Reimplemented from eZDataType.

Definition at line 431 of file ezintegertype.php.

eZIntegerType::metaData ( contentObjectAttribute)

Returns the meta data used for storing search indeces.

Reimplemented from eZDataType.

Definition at line 400 of file ezintegertype.php.

eZIntegerType::objectAttributeContent ( contentObjectAttribute)

Returns the content.

Reimplemented from eZDataType.

Definition at line 391 of file ezintegertype.php.

eZIntegerType::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 454 of file ezintegertype.php.

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

Reimplemented from eZDataType.

Definition at line 444 of file ezintegertype.php.

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

Reimplemented from eZDataType.

Definition at line 449 of file ezintegertype.php.

eZIntegerType::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 258 of file ezintegertype.php.

eZIntegerType::storeObjectAttribute ( object_attribute)

Does nothing, the data is already present in the attribute.

Reimplemented from eZDataType.

Definition at line 254 of file ezintegertype.php.

eZIntegerType::supportsBatchInitializeObjectAttribute ( )

Reimplemented from eZDataType.

Definition at line 514 of file ezintegertype.php.

eZIntegerType::title ( contentObjectAttribute,
name = null 
)

Returns the integer value.

Reimplemented from eZDataType.

Definition at line 421 of file ezintegertype.php.

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

Reimplemented from eZDataType.

Definition at line 408 of file ezintegertype.php.

eZIntegerType::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 479 of file ezintegertype.php.

eZIntegerType::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 262 of file ezintegertype.php.

eZIntegerType::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 207 of file ezintegertype.php.

eZIntegerType::validateIntegerHTTPInput ( data,
contentObjectAttribute,
classAttribute 
)

Private method, only for using inside this class.

Definition at line 67 of file ezintegertype.php.

Referenced by validateCollectionAttributeHTTPInput(), and validateObjectAttributeHTTPInput().

eZIntegerType::validateObjectAttributeHTTPInput ( http,
base,
contentObjectAttribute 
)

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

Reimplemented from eZDataType.

Definition at line 128 of file ezintegertype.php.


Member Data Documentation

eZIntegerType::$IntegerValidator

The integer value validator.

Definition at line 521 of file ezintegertype.php.

const eZIntegerType::DATA_TYPE_STRING = "ezinteger"

Definition at line 43 of file ezintegertype.php.

Definition at line 48 of file ezintegertype.php.

const eZIntegerType::DEFAULT_VALUE_VARIABLE = "_ezinteger_default_value_"

Definition at line 49 of file ezintegertype.php.

const eZIntegerType::INPUT_STATE_FIELD = "data_int4"

Definition at line 50 of file ezintegertype.php.

const eZIntegerType::MAX_VALUE_FIELD = "data_int2"

Definition at line 46 of file ezintegertype.php.

const eZIntegerType::MAX_VALUE_VARIABLE = "_ezinteger_max_integer_value_"

Definition at line 47 of file ezintegertype.php.

const eZIntegerType::MIN_VALUE_FIELD = "data_int1"

Definition at line 44 of file ezintegertype.php.

const eZIntegerType::MIN_VALUE_VARIABLE = "_ezinteger_min_integer_value_"

Definition at line 45 of file ezintegertype.php.


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