Exponential 6.0.13 Exponential Enterprise Open Source CMS - PHP Class Reference

Public Member Functions | Public Attributes | List of all members
eZIntegerType Class Reference

A content datatype which handles integers. More...

Inheritance diagram for eZIntegerType:

## Public Member Functions
| __construct ()
| validateIntegerHTTPInput ( $data, $contentObjectAttribute, $classAttribute)
| validateObjectAttributeHTTPInput ( $http, $base, $contentObjectAttribute)
| fixupObjectAttributeHTTPInput ( $http, $base, $contentObjectAttribute)
| initializeObjectAttribute ( $contentObjectAttribute, $currentVersion, $originalContentObjectAttribute)
| fetchObjectAttributeHTTPInput ( $http, $base, $contentObjectAttribute)
| validateCollectionAttributeHTTPInput ( $http, $base, $contentObjectAttribute)
| fetchCollectionAttributeHTTPInput ( $collection, $collectionAttribute, $http, $base, $contentObjectAttribute)
| storeObjectAttribute ( $object_attribute)
| storeClassAttribute ( $attribute, $version)
| validateClassAttributeHTTPInput ( $http, $base, $classAttribute)
| fixupClassAttributeHTTPInput ( $http, $base, $classAttribute)
| fetchClassAttributeHTTPInput ( $http, $base, $classAttribute)
| objectAttributeContent ( $contentObjectAttribute)
| metaData ( $contentObjectAttribute)
| toString ( $contentObjectAttribute)
| fromString ( $contentObjectAttribute, $string)
| title ( $contentObjectAttribute, $name=null)
| hasObjectAttributeContent ( $contentObjectAttribute)
| isInformationCollector ()
| isIndexable ()
| sortKey ( $contentObjectAttribute)
| sortKeyType ()
| serializeContentClassAttribute ( $classAttribute, $attributeNode, $attributeParametersNode)
| unserializeContentClassAttribute ( $classAttribute, $attributeNode, $attributeParametersNode)
| batchInitializeObjectAttributeData ( $classAttribute)
| supportsBatchInitializeObjectAttribute ()
Public Member Functions inherited from eZDataType
| __construct ( $dataTypeString, $name, $properties=array())
| eZDataType ( $dataTypeString, $name, $properties=array())
| viewTemplate ( $contentobjectAttribute)
| editTemplate ( $contentobjectAttribute)
| informationTemplate ( $contentobjectAttribute)
| resultTemplate (&$collectionAttribute)
| isA ()
| isTranslatable ()
| attributes ()
| hasAttribute ( $attr)
| attribute ( $attr)
| isHTTPFileInsertionSupported ()
| isRegularFileInsertionSupported ()
| isSimpleStringInsertionSupported ()
| isRelationType ()
| insertHTTPFile ( $object, $objectVersion, $objectLanguage, $objectAttribute, $httpFile, $mimeData, &$result)
| insertRegularFile ( $object, $objectVersion, $objectLanguage, $objectAttribute, $filePath, &$result)
| insertSimpleString ( $object, $objectVersion, $objectLanguage, $objectAttribute, $string, &$result)
| hasStoredFileInformation ( $object, $objectVersion, $objectLanguage, $objectAttribute)
| handleDownload ( $object, $objectVersion, $objectLanguage, $objectAttribute)
| storedFileInformation ( $object, $objectVersion, $objectLanguage, $objectAttribute)
| productOptionInformation ( $objectAttribute, $optionID, $productItem)
| objectDisplayInformation ( $objectAttribute, $mergeInfo=false)
| classDisplayInformation ( $classAttribute, $mergeInfo=false)
| classAttributeContent ( $classAttribute)
| onPublish ( $contentObjectAttribute, $contentObject, $publishedNodes)
| preStoreClassAttribute ( $classAttribute, $version)
| storeDefinedClassAttribute ( $classAttribute)
| storeModifiedClassAttribute ( $classAttribute)
| storeVersionedClassAttribute ( $classAttribute, $version)
| preStoreDefinedClassAttribute ( $classAttribute)
| preStoreModifiedClassAttribute ( $classAttribute)
| preStoreVersionedClassAttribute ( $classAttribute, $version)
| customClassAttributeHTTPAction ( $http, $action, $classAttribute)
| fetchActionValue ( $action, $actionName, &$value)
| fixupCollectionAttributeHTTPInput ( $http, $base, $objectAttribute)
| customObjectAttributeHTTPAction ( $http, $action, $objectAttribute, $parameters)
| handleCustomObjectHTTPActions ( $http, $attributeDataBaseName, $customActionAttributeArray, $customActionParameters)
| initializeClassAttribute ( $classAttribute)
| cloneClassAttribute ( $oldClassAttribute, $newClassAttribute)
| repairContentObjectAttribute ( $contentObjectAttribute)
| postInitializeObjectAttribute ( $objectAttribute, $currentVersion, $originalContentObjectAttribute)
| postStore ( $objectAttribute)
| trashStoredObjectAttribute ( $objectAttribute, $version=null)
| restoreTrashedObjectAttribute ( $objectAttribute)
| deleteStoredObjectAttribute ( $objectAttribute, $version=null)
| deleteStoredClassAttribute ( $classAttribute, $version=null)
| deleteNotVersionedStoredClassAttribute (eZContentClassAttribute $classAttribute)
| contentActionList ( $classAttribute)
| hasInformationCollection ()
| isAddToBasketValidationRequired ()
| validateAddToBasket ( $objectAttribute, $data, &$errors)
| isClassAttributeRemovable ( $classAttribute)
| classAttributeRemovableInformation ( $classAttribute, $includeAll=true)
| customSorting ()
| customSortingSQL ( $params)
| templateList ()
| serializeContentObjectAttribute ( $package, $objectAttribute)
| unserializeContentObjectAttribute ( $package, $objectAttribute, $attributeNode)
| postUnserializeContentObjectAttribute ( $package, $objectAttribute)
| removeRelatedObjectItem ( $contentObjectAttribute, $objectID)
| fixRelatedObjectItem ( $contentObjectAttribute, $objectID, $mode)
| createContentObjectAttributeDOMNode ( $objectAttribute)
| diff ( $old, $new, $options=false)
| getDBAFileName ()
| getDBAFilePath ( $checkExtensions=true)
| getDBAExtensionFilePath ()
| importDBDataFromDBAFile ( $dbaFilePath=false)

## Public Attributes
const | DATA_TYPE_STRING = "ezinteger"
const | MIN_VALUE_FIELD = "data_int1"
const | MIN_VALUE_VARIABLE = "_ezinteger_min_integer_value_"
const | MAX_VALUE_FIELD = "data_int2"
const | MAX_VALUE_VARIABLE = "_ezinteger_max_integer_value_"
const | DEFAULT_VALUE_FIELD = "data_int3"
const | DEFAULT_VALUE_VARIABLE = "_ezinteger_default_value_"
const | INPUT_STATE_FIELD = "data_int4"
const | NO_MIN_MAX_VALUE = 0
const | HAS_MIN_VALUE = 1
const | HAS_MAX_VALUE = 2
const | HAS_MIN_MAX_VALUE = 3
| $IntegerValidator
Public Attributes inherited from eZDataType
| $Attributes
| $DataTypeString
| The datatype string ID, used for uniquely identifying a datatype. More...
| $Name
| The descriptive name of the datatype, usually used for displaying to the user. More...

## Additional Inherited Members
Static Public Member Functions inherited from eZDataType
static | create ( $dataTypeString)
static | registeredDataTypes ()
static | register ( $dataTypeString, $className)
static | allowedTypes ()
static | loadAndRegisterAllTypes ()
static | loadAndRegisterType ( $type)

## 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 23 of file ezintegertype.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZIntegerType::__construct | ( |  | ) |

Definition at line 38 of file ezintegertype.php.

References ezpI18n\tr().

## Member Function Documentation

## ◆ batchInitializeObjectAttributeData()

eZIntegerType::batchInitializeObjectAttributeData | ( |  | $classAttribute | ) |

Reimplemented from eZDataType.

Definition at line 488 of file ezintegertype.php.

## ◆ fetchClassAttributeHTTPInput()

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 331 of file ezintegertype.php.

References HAS_MAX_VALUE, HAS_MIN_MAX_VALUE, HAS_MIN_VALUE, and NO_MIN_MAX_VALUE.

## ◆ fetchCollectionAttributeHTTPInput()

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

Fetches the http post variables for collected information

Reimplemented from eZDataType.

Definition at line 226 of file ezintegertype.php.

## ◆ fetchObjectAttributeHTTPInput()

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 182 of file ezintegertype.php.

## ◆ fixupClassAttributeHTTPInput()

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 308 of file ezintegertype.php.

## ◆ fixupObjectAttributeHTTPInput()

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 151 of file ezintegertype.php.

## ◆ fromString()

eZIntegerType::fromString | ( |  | $contentObjectAttribute,
|  |  | $string
| ) |  |

Reimplemented from eZDataType.

Definition at line 401 of file ezintegertype.php.

## ◆ hasObjectAttributeContent()

eZIntegerType::hasObjectAttributeContent | ( |  | $contentObjectAttribute | ) |

Returns
  `true` if the datatype finds any content in the attribute $contentObjectAttribute.

Reimplemented from eZDataType.

Definition at line 414 of file ezintegertype.php.

## ◆ initializeObjectAttribute()

eZIntegerType::initializeObjectAttribute | ( |  | $contentObjectAttribute,
|  |  | $currentVersion,
|  |  | $originalContentObjectAttribute
| ) |  |

Sets the default value.

Reimplemented from eZDataType.

Definition at line 158 of file ezintegertype.php.

## ◆ isIndexable()

eZIntegerType::isIndexable | ( |  | ) |

Returns
  true if the datatype can be indexed

Reimplemented from eZDataType.

Definition at line 427 of file ezintegertype.php.

## ◆ isInformationCollector()

eZIntegerType::isInformationCollector | ( |  | ) |

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

Reimplemented from eZDataType.

Definition at line 419 of file ezintegertype.php.

## ◆ metaData()

eZIntegerType::metaData | ( |  | $contentObjectAttribute | ) |

Returns the meta data used for storing search indeces.

Reimplemented from eZDataType.

Definition at line 388 of file ezintegertype.php.

## ◆ objectAttributeContent()

eZIntegerType::objectAttributeContent | ( |  | $contentObjectAttribute | ) |

Returns the content.

Reimplemented from eZDataType.

Definition at line 379 of file ezintegertype.php.

## ◆ serializeContentClassAttribute()

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 442 of file ezintegertype.php.

## ◆ sortKey()

eZIntegerType::sortKey | ( |  | $objectAttribute | ) |

Returns
  the sort key for the datatype. This is used for sorting on attribute level.

Reimplemented from eZDataType.

Definition at line 432 of file ezintegertype.php.

## ◆ sortKeyType()

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 437 of file ezintegertype.php.

## ◆ storeClassAttribute()

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 246 of file ezintegertype.php.

## ◆ storeObjectAttribute()

eZIntegerType::storeObjectAttribute | ( |  | $object_attribute | ) |

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

Reimplemented from eZDataType.

Definition at line 242 of file ezintegertype.php.

## ◆ supportsBatchInitializeObjectAttribute()

eZIntegerType::supportsBatchInitializeObjectAttribute | ( |  | ) |

Reimplemented from eZDataType.

Definition at line 502 of file ezintegertype.php.

## ◆ title()

eZIntegerType::title | ( |  | $contentObjectAttribute,
|  |  | $name = `null`
| ) |  |

Returns the integer value.

Reimplemented from eZDataType.

Definition at line 409 of file ezintegertype.php.

## ◆ toString()

eZIntegerType::toString | ( |  | $contentObjectAttribute | ) |

Returns
  string representation of an contentobjectattribute data for simplified export

Reimplemented from eZDataType.

Definition at line 396 of file ezintegertype.php.

## ◆ unserializeContentClassAttribute()

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 467 of file ezintegertype.php.

References HAS_MAX_VALUE, HAS_MIN_MAX_VALUE, HAS_MIN_VALUE, and NO_MIN_MAX_VALUE.

## ◆ validateClassAttributeHTTPInput()

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 250 of file ezintegertype.php.

References eZInputValidator\STATE_ACCEPTED, eZInputValidator\STATE_INTERMEDIATE, eZInputValidator\STATE_INVALID, and eZDebug\writeNotice().

## ◆ validateCollectionAttributeHTTPInput()

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 195 of file ezintegertype.php.

References eZInputValidator\STATE_ACCEPTED, eZInputValidator\STATE_INVALID, ezpI18n\tr(), and validateIntegerHTTPInput().

## ◆ validateIntegerHTTPInput()

eZIntegerType::validateIntegerHTTPInput | ( |  | $data,
|  |  | $contentObjectAttribute,
|  |  | $classAttribute
| ) |  |

Validates $data with the constraints defined on the class attribute

Parameters

  | $data |
  eZContentObjectAttribute | $contentObjectAttribute |
  eZContentClassAttribute | $classAttribute |

Returns
  int

Definition at line 55 of file ezintegertype.php.

References HAS_MAX_VALUE, HAS_MIN_MAX_VALUE, HAS_MIN_VALUE, NO_MIN_MAX_VALUE, eZInputValidator\STATE_ACCEPTED, eZInputValidator\STATE_INTERMEDIATE, eZInputValidator\STATE_INVALID, and ezpI18n\tr().

Referenced by validateCollectionAttributeHTTPInput(), and validateObjectAttributeHTTPInput().

## ◆ 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 116 of file ezintegertype.php.

References eZInputValidator\STATE_ACCEPTED, eZInputValidator\STATE_INVALID, ezpI18n\tr(), and validateIntegerHTTPInput().

## Member Data Documentation

## ◆ $IntegerValidator

eZIntegerType::$IntegerValidator

The integer value validator

Definition at line 509 of file ezintegertype.php.

## ◆ DATA_TYPE_STRING

const eZIntegerType::DATA_TYPE_STRING = "ezinteger"

Definition at line 25 of file ezintegertype.php.

## ◆ DEFAULT_VALUE_FIELD

const eZIntegerType::DEFAULT_VALUE_FIELD = "data_int3"

Definition at line 30 of file ezintegertype.php.

## ◆ DEFAULT_VALUE_VARIABLE

const eZIntegerType::DEFAULT_VALUE_VARIABLE = "_ezinteger_default_value_"

Definition at line 31 of file ezintegertype.php.

## ◆ HAS_MAX_VALUE

const eZIntegerType::HAS_MAX_VALUE = 2

Definition at line 35 of file ezintegertype.php.

Referenced by fetchClassAttributeHTTPInput(), unserializeContentClassAttribute(), and validateIntegerHTTPInput().

## ◆ HAS_MIN_MAX_VALUE

const eZIntegerType::HAS_MIN_MAX_VALUE = 3

Definition at line 36 of file ezintegertype.php.

Referenced by fetchClassAttributeHTTPInput(), unserializeContentClassAttribute(), and validateIntegerHTTPInput().

## ◆ HAS_MIN_VALUE

const eZIntegerType::HAS_MIN_VALUE = 1

Definition at line 34 of file ezintegertype.php.

Referenced by fetchClassAttributeHTTPInput(), unserializeContentClassAttribute(), and validateIntegerHTTPInput().

## ◆ INPUT_STATE_FIELD

const eZIntegerType::INPUT_STATE_FIELD = "data_int4"

Definition at line 32 of file ezintegertype.php.

## ◆ MAX_VALUE_FIELD

const eZIntegerType::MAX_VALUE_FIELD = "data_int2"

Definition at line 28 of file ezintegertype.php.

## ◆ MAX_VALUE_VARIABLE

const eZIntegerType::MAX_VALUE_VARIABLE = "_ezinteger_max_integer_value_"

Definition at line 29 of file ezintegertype.php.

## ◆ MIN_VALUE_FIELD

const eZIntegerType::MIN_VALUE_FIELD = "data_int1"

Definition at line 26 of file ezintegertype.php.

## ◆ MIN_VALUE_VARIABLE

const eZIntegerType::MIN_VALUE_VARIABLE = "_ezinteger_min_integer_value_"

Definition at line 27 of file ezintegertype.php.

## ◆ NO_MIN_MAX_VALUE

const eZIntegerType::NO_MIN_MAX_VALUE = 0

Definition at line 33 of file ezintegertype.php.

Referenced by fetchClassAttributeHTTPInput(), unserializeContentClassAttribute(), and validateIntegerHTTPInput().

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

- ezintegertype.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.