Exponential 6.0.13 Exponential Enterprise Open Source CMS - PHP Class Reference

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

Stores a float value. More...

Inheritance diagram for eZFloatType:

## Public Member Functions
| __construct ()
| initializeObjectAttribute ( $contentObjectAttribute, $currentVersion, $originalContentObjectAttribute)
| fetchObjectAttributeHTTPInput ( $http, $base, $contentObjectAttribute)
| validateFloatHTTPInput ( $data, $contentObjectAttribute, $classAttribute)
| validateObjectAttributeHTTPInput ( $http, $base, $contentObjectAttribute)
| fixupObjectAttributeHTTPInput ( $http, $base, $contentObjectAttribute)
| storeObjectAttribute ( $attribute)
| fetchClassAttributeHTTPInput ( $http, $base, $classAttribute)
| validateClassAttributeHTTPInput ( $http, $base, $classAttribute)
| fixupClassAttributeHTTPInput ( $http, $base, $classAttribute)
| storeClassAttribute ( $attribute, $version)
| metaData ( $contentObjectAttribute)
| objectAttributeContent ( $contentObjectAttribute)
| title ( $contentObjectAttribute, $name=null)
| hasObjectAttributeContent ( $contentObjectAttribute)
| toString ( $contentObjectAttribute)
| fromString ( $contentObjectAttribute, $string)
| serializeContentClassAttribute ( $classAttribute, $attributeNode, $attributeParametersNode)
| unserializeContentClassAttribute ( $classAttribute, $attributeNode, $attributeParametersNode)
| supportsBatchInitializeObjectAttribute ()
| batchInitializeObjectAttributeData ( $classAttribute)
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)
| validateCollectionAttributeHTTPInput ( $http, $base, $objectAttribute)
| fixupCollectionAttributeHTTPInput ( $http, $base, $objectAttribute)
| fetchCollectionAttributeHTTPInput ( $collection, $collectionAttribute, $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 ()
| isIndexable ()
| isAddToBasketValidationRequired ()
| validateAddToBasket ( $objectAttribute, $data, &$errors)
| isClassAttributeRemovable ( $classAttribute)
| classAttributeRemovableInformation ( $classAttribute, $includeAll=true)
| isInformationCollector ()
| sortKey ( $objectAttribute)
| sortKeyType ()
| 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 = "ezfloat"
const | MIN_FIELD = "data_float1"
const | MIN_VARIABLE = "_ezfloat_min_float_value_"
const | MAX_FIELD = "data_float2"
const | MAX_VARIABLE = "_ezfloat_max_float_value_"
const | DEFAULT_FIELD = "data_float3"
const | DEFAULT_VARIABLE = "_ezfloat_default_value_"
const | INPUT_STATE_FIELD = "data_float4"
const | NO_MIN_MAX_VALUE = 0
const | HAS_MIN_VALUE = 1
const | HAS_MAX_VALUE = 2
const | HAS_MIN_MAX_VALUE = 3
| $FloatValidator
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

Stores a float value.

Definition at line 18 of file ezfloattype.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZFloatType::__construct | ( |  | ) |

Definition at line 33 of file ezfloattype.php.

References ezpI18n\tr().

## Member Function Documentation

## ◆ batchInitializeObjectAttributeData()

eZFloatType::batchInitializeObjectAttributeData | ( |  | $classAttribute | ) |

Reimplemented from eZDataType.

Definition at line 442 of file ezfloattype.php.

## ◆ fetchClassAttributeHTTPInput()

eZFloatType::fetchClassAttributeHTTPInput | ( |  | $http,
|  |  | $base,
|  |  | $classAttribute
| ) |  |

Fetches the HTTP input for the content class attribute.

Note
  Default implementation does nothing.

Reimplemented from eZDataType.

Definition at line 211 of file ezfloattype.php.

References HAS_MAX_VALUE, HAS_MIN_MAX_VALUE, HAS_MIN_VALUE, eZLocale\instance(), and NO_MIN_MAX_VALUE.

## ◆ fetchObjectAttributeHTTPInput()

eZFloatType::fetchObjectAttributeHTTPInput | ( |  | $http,
|  |  | $base,
|  |  | $contentObjectAttribute
| ) |  |

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

Reimplemented from eZDataType.

Definition at line 68 of file ezfloattype.php.

References eZLocale\instance().

## ◆ fixupClassAttributeHTTPInput()

eZFloatType::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 323 of file ezfloattype.php.

References eZLocale\instance().

## ◆ fixupObjectAttributeHTTPInput()

eZFloatType::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 203 of file ezfloattype.php.

## ◆ fromString()

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

Reimplemented from eZDataType.

Definition at line 386 of file ezfloattype.php.

## ◆ hasObjectAttributeContent()

eZFloatType::hasObjectAttributeContent | ( |  | $contentObjectAttribute | ) |

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

Reimplemented from eZDataType.

Definition at line 373 of file ezfloattype.php.

## ◆ initializeObjectAttribute()

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

Sets the default value.

Reimplemented from eZDataType.

Definition at line 44 of file ezfloattype.php.

## ◆ metaData()

eZFloatType::metaData | ( |  | $contentObjectAttribute | ) |

Returns
  the text which should be indexed in the search engine. An associative array can be returned to enable searching in specific parts of the data. E.g. array( 'first_column' => "foo", 'second_column' => "bar" );

Reimplemented from eZDataType.

Definition at line 351 of file ezfloattype.php.

## ◆ objectAttributeContent()

eZFloatType::objectAttributeContent | ( |  | $contentObjectAttribute | ) |

Returns the content.

Reimplemented from eZDataType.

Definition at line 359 of file ezfloattype.php.

## ◆ serializeContentClassAttribute()

eZFloatType::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 391 of file ezfloattype.php.

## ◆ storeClassAttribute()

eZFloatType::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 347 of file ezfloattype.php.

## ◆ storeObjectAttribute()

eZFloatType::storeObjectAttribute | ( |  | $objectAttribute | ) |

Stores the datatype data to the database which is related to the object attribute.

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.

See also
  fetchObjectAttributeHTTPInput

Reimplemented from eZDataType.

Definition at line 207 of file ezfloattype.php.

## ◆ supportsBatchInitializeObjectAttribute()

eZFloatType::supportsBatchInitializeObjectAttribute | ( |  | ) |

Reimplemented from eZDataType.

Definition at line 437 of file ezfloattype.php.

## ◆ title()

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

Returns the float value.

Reimplemented from eZDataType.

Definition at line 368 of file ezfloattype.php.

## ◆ toString()

eZFloatType::toString | ( |  | $contentObjectAttribute | ) |

Returns
  string representation of an contentobjectattribute data for simplified export

Reimplemented from eZDataType.

Definition at line 381 of file ezfloattype.php.

## ◆ unserializeContentClassAttribute()

eZFloatType::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 416 of file ezfloattype.php.

References HAS_MAX_VALUE, HAS_MIN_MAX_VALUE, HAS_MIN_VALUE, and NO_MIN_MAX_VALUE.

## ◆ validateClassAttributeHTTPInput()

eZFloatType::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 261 of file ezfloattype.php.

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

## ◆ validateFloatHTTPInput()

eZFloatType::validateFloatHTTPInput | ( |  | $data,
|  |  | $contentObjectAttribute,
|  |  | $classAttribute
| ) |  |

Validates $data with the constraints defined on the class attribute

Parameters

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

Returns
  int

Definition at line 95 of file ezfloattype.php.

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

Referenced by validateObjectAttributeHTTPInput().

## ◆ validateObjectAttributeHTTPInput()

eZFloatType::validateObjectAttributeHTTPInput | ( |  | $http,
|  |  | $base,
|  |  | $contentObjectAttribute
| ) |  |

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

Reimplemented from eZDataType.

Definition at line 180 of file ezfloattype.php.

References eZLocale\instance(), eZInputValidator\STATE_ACCEPTED, eZInputValidator\STATE_INVALID, and validateFloatHTTPInput().

## Member Data Documentation

## ◆ $FloatValidator

eZFloatType::$FloatValidator

The float value validator

Definition at line 455 of file ezfloattype.php.

## ◆ DATA_TYPE_STRING

const eZFloatType::DATA_TYPE_STRING = "ezfloat"

Definition at line 20 of file ezfloattype.php.

## ◆ DEFAULT_FIELD

const eZFloatType::DEFAULT_FIELD = "data_float3"

Definition at line 25 of file ezfloattype.php.

## ◆ DEFAULT_VARIABLE

const eZFloatType::DEFAULT_VARIABLE = "_ezfloat_default_value_"

Definition at line 26 of file ezfloattype.php.

## ◆ HAS_MAX_VALUE

const eZFloatType::HAS_MAX_VALUE = 2

Definition at line 30 of file ezfloattype.php.

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

## ◆ HAS_MIN_MAX_VALUE

const eZFloatType::HAS_MIN_MAX_VALUE = 3

Definition at line 31 of file ezfloattype.php.

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

## ◆ HAS_MIN_VALUE

const eZFloatType::HAS_MIN_VALUE = 1

Definition at line 29 of file ezfloattype.php.

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

## ◆ INPUT_STATE_FIELD

const eZFloatType::INPUT_STATE_FIELD = "data_float4"

Definition at line 27 of file ezfloattype.php.

## ◆ MAX_FIELD

const eZFloatType::MAX_FIELD = "data_float2"

Definition at line 23 of file ezfloattype.php.

## ◆ MAX_VARIABLE

const eZFloatType::MAX_VARIABLE = "_ezfloat_max_float_value_"

Definition at line 24 of file ezfloattype.php.

## ◆ MIN_FIELD

const eZFloatType::MIN_FIELD = "data_float1"

Definition at line 21 of file ezfloattype.php.

## ◆ MIN_VARIABLE

const eZFloatType::MIN_VARIABLE = "_ezfloat_min_float_value_"

Definition at line 22 of file ezfloattype.php.

## ◆ NO_MIN_MAX_VALUE

const eZFloatType::NO_MIN_MAX_VALUE = 0

Definition at line 28 of file ezfloattype.php.

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

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

- ezfloattype.php

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