Exponential 6.0.13 Exponential Enterprise Open Source CMS - PHP Class Reference

Public Member Functions | Static Public Member Functions | Public Attributes | Static Protected Member Functions | List of all members
eZCountryType Class Reference

A content datatype that contains country. More...

Inheritance diagram for eZCountryType:

## Public Member Functions
| __construct ()
| fetchClassAttributeHTTPInput ( $http, $base, $classAttribute)
| preStoreClassAttribute ( $classAttribute, $version)
| storeClassAttributeContent ( $classAttribute, $content)
| initializeObjectAttribute ( $contentObjectAttribute, $currentVersion, $originalContentObjectAttribute)
| validateObjectAttributeHTTPInput ( $http, $base, $contentObjectAttribute)
| validateCollectionAttributeHTTPInput ( $http, $base, $contentObjectAttribute)
| fetchObjectAttributeHTTPInput ( $http, $base, $contentObjectAttribute)
| fetchCollectionAttributeHTTPInput ( $collection, $collectionAttribute, $http, $base, $contentObjectAttribute)
| storeObjectAttribute ( $contentObjectAttribute)
| isSimpleStringInsertionSupported ()
| insertSimpleString ( $object, $objectVersion, $objectLanguage, $objectAttribute, $string, &$result)
| objectAttributeContent ( $contentObjectAttribute)
| classAttributeContent ( $classAttribute)
| metaData ( $contentObjectAttribute)
| toString ( $contentObjectAttribute)
| fromString ( $contentObjectAttribute, $string)
| title ( $contentObjectAttribute, $name=null)
| hasObjectAttributeContent ( $contentObjectAttribute)
| isIndexable ()
| isInformationCollector ()
| sortKey ( $contentObjectAttribute)
| sortKeyType ()
| diff ( $old, $new, $options=false)
| 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 ()
| isRelationType ()
| insertHTTPFile ( $object, $objectVersion, $objectLanguage, $objectAttribute, $httpFile, $mimeData, &$result)
| insertRegularFile ( $object, $objectVersion, $objectLanguage, $objectAttribute, $filePath, &$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)
| onPublish ( $contentObjectAttribute, $contentObject, $publishedNodes)
| storeClassAttribute ( $classAttribute, $version)
| storeDefinedClassAttribute ( $classAttribute)
| storeModifiedClassAttribute ( $classAttribute)
| storeVersionedClassAttribute ( $classAttribute, $version)
| preStoreDefinedClassAttribute ( $classAttribute)
| preStoreModifiedClassAttribute ( $classAttribute)
| preStoreVersionedClassAttribute ( $classAttribute, $version)
| validateClassAttributeHTTPInput ( $http, $base, $classAttribute)
| fixupClassAttributeHTTPInput ( $http, $base, $classAttribute)
| customClassAttributeHTTPAction ( $http, $action, $classAttribute)
| fetchActionValue ( $action, $actionName, &$value)
| fixupObjectAttributeHTTPInput ( $http, $base, $objectAttribute)
| 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 ()
| serializeContentClassAttribute ( $classAttribute, $attributeNode, $attributeParametersNode)
| unserializeContentClassAttribute ( $classAttribute, $attributeNode, $attributeParametersNode)
| serializeContentObjectAttribute ( $package, $objectAttribute)
| unserializeContentObjectAttribute ( $package, $objectAttribute, $attributeNode)
| postUnserializeContentObjectAttribute ( $package, $objectAttribute)
| removeRelatedObjectItem ( $contentObjectAttribute, $objectID)
| fixRelatedObjectItem ( $contentObjectAttribute, $objectID, $mode)
| createContentObjectAttributeDOMNode ( $objectAttribute)
| getDBAFileName ()
| getDBAFilePath ( $checkExtensions=true)
| getDBAExtensionFilePath ()
| importDBDataFromDBAFile ( $dbaFilePath=false)
| batchInitializeObjectAttributeData ( $classAttribute)

## Static Public Member Functions
static | fetchCountryList ()
static | fetchTranslatedNames (&$countries)
static | fetchCountry ( $value, $fetchBy=false)
Static Public Member Functions inherited from eZDataType
static | create ( $dataTypeString)
static | registeredDataTypes ()
static | register ( $dataTypeString, $className)
static | allowedTypes ()
static | loadAndRegisterAllTypes ()
static | loadAndRegisterType ( $type)

## Public Attributes
const | DATA_TYPE_STRING = 'ezcountry'
const | DEFAULT_LIST_FIELD = 'data_text5'
const | MULTIPLE_CHOICE_FIELD = 'data_int1'
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...

## Static Protected Member Functions
static | compareCountryNames ( $a, $b)

## Detailed Description

A content datatype that contains country.

The list of countries is fetched from contenet.ini. Country is stored as text string.

Definition at line 22 of file ezcountrytype.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZCountryType::__construct | ( |  | ) |

Definition at line 30 of file ezcountrytype.php.

References ezpI18n\tr().

## Member Function Documentation

## ◆ classAttributeContent()

eZCountryType::classAttributeContent | ( |  | $classAttribute | ) |

Returns the content data for the given content class attribute.

Reimplemented from eZDataType.

Definition at line 331 of file ezcountrytype.php.

References fetchCountry().

## ◆ compareCountryNames()

static eZCountryType::compareCountryNames | ( |  | $a,
|  |  | $b
| ) |  |
| static protected

Sort callback used by fetchTranslatedNames to compare two country arrays

Parameters

  array | $a | Country 1
  array | $b | Country 2

Returns
  bool

Definition at line 76 of file ezcountrytype.php.

## ◆ diff()

eZCountryType::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 449 of file ezcountrytype.php.

## ◆ fetchClassAttributeHTTPInput()

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

Fetches the HTTP input for the content class attribute.

Note
  Default implementation does nothing.

Reimplemented from eZDataType.

Definition at line 109 of file ezcountrytype.php.

References fetchCountry().

## ◆ fetchCollectionAttributeHTTPInput()

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

Fetches the http post variables for collected information

Reimplemented from eZDataType.

Definition at line 266 of file ezcountrytype.php.

## ◆ fetchCountry()

static eZCountryType::fetchCountry | ( |  | $value,
|  |  | $fetchBy = `false`
| ) |  |
| static

Fetches country by $fetchBy. if $fetchBy is false country name will be used.

Definition at line 85 of file ezcountrytype.php.

References fetchCountryList().

Referenced by classAttributeContent(), fetchClassAttributeHTTPInput(), fetchObjectAttributeHTTPInput(), and objectAttributeContent().

## ◆ fetchCountryList()

static eZCountryType::fetchCountryList | ( |  | ) |
| static

Fetches country list from ini.

Definition at line 40 of file ezcountrytype.php.

References fetchTranslatedNames().

Referenced by fetchCountry(), and fetchObjectAttributeHTTPInput().

## ◆ fetchObjectAttributeHTTPInput()

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

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

Reimplemented from eZDataType.

Definition at line 222 of file ezcountrytype.php.

References fetchCountry(), and fetchCountryList().

## ◆ fetchTranslatedNames()

static eZCountryType::fetchTranslatedNames | ( | & | $countries | ) |
| static

Fetches translated country names from locale $countries will be updated.

Definition at line 56 of file ezcountrytype.php.

References eZLocale\instance().

Referenced by fetchCountryList().

## ◆ fromString()

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

Reimplemented from eZDataType.

Definition at line 379 of file ezcountrytype.php.

## ◆ hasObjectAttributeContent()

eZCountryType::hasObjectAttributeContent | ( |  | $contentObjectAttribute | ) |

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

Reimplemented from eZDataType.

Definition at line 406 of file ezcountrytype.php.

## ◆ initializeObjectAttribute()

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

Sets the default value.

Reimplemented from eZDataType.

Definition at line 169 of file ezcountrytype.php.

## ◆ insertSimpleString()

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

\virtual Inserts the string $string to the content object attribute $objectAttribute.

Parameters

  | $object | The contentobject in which the attribute is contained
  | $objectVersion | The current version of the object it is being worked on
  | $objectLanguage | The current language being worked on
  | $objectAttribute | The attribute which will get the file
  | $filePath | Full path including the filename
  [out] | $result | Array which will be filled with information on the process, it will contain: errors - Array with error elements, each element is an array with `'description'` containing the text require_storage - `true` if the attribute must be stored after this call, or `false` if not required at all

Returns
  `true` if the file was stored correctly in the attribute or `false` if something failed.

Note
  The datatype will return `null` (the default) if does not support HTTP files.
  $result will not be defined if the return value is `null`

See also
  isSimpleStringInsertionSupported()

Reimplemented from eZDataType.

Definition at line 297 of file ezcountrytype.php.

## ◆ isIndexable()

eZCountryType::isIndexable | ( |  | ) |

Returns
  true if the datatype can be indexed

Reimplemented from eZDataType.

Definition at line 413 of file ezcountrytype.php.

## ◆ isInformationCollector()

eZCountryType::isInformationCollector | ( |  | ) |

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

Reimplemented from eZDataType.

Definition at line 418 of file ezcountrytype.php.

## ◆ isSimpleStringInsertionSupported()

eZCountryType::isSimpleStringInsertionSupported | ( |  | ) |

Simple string insertion is supported.

Reimplemented from eZDataType.

Definition at line 292 of file ezcountrytype.php.

## ◆ metaData()

eZCountryType::metaData | ( |  | $contentObjectAttribute | ) |

Returns the meta data used for storing search indeces.

Reimplemented from eZDataType.

Definition at line 352 of file ezcountrytype.php.

## ◆ objectAttributeContent()

eZCountryType::objectAttributeContent | ( |  | $contentObjectAttribute | ) |

Returns the content.

Reimplemented from eZDataType.

Definition at line 311 of file ezcountrytype.php.

References fetchCountry().

## ◆ preStoreClassAttribute()

eZCountryType::preStoreClassAttribute | ( |  | $classAttribute,
|  |  | $version
| ) |  |

Similar to the storeClassAttribute but is called before the attribute itself is stored and can be used to set values in the class attribute.

Returns
  True if the value was stored correctly.

See also
  fetchClassAttributeHTTPInput

Reimplemented from eZDataType.

Definition at line 146 of file ezcountrytype.php.

References storeClassAttributeContent().

## ◆ sortKey()

eZCountryType::sortKey | ( |  | $objectAttribute | ) |

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

Reimplemented from eZDataType.

Definition at line 423 of file ezcountrytype.php.

References eZCharTransform\instance().

## ◆ sortKeyType()

eZCountryType::sortKeyType | ( |  | ) |

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

Reimplemented from eZDataType.

Definition at line 444 of file ezcountrytype.php.

## ◆ storeClassAttributeContent()

eZCountryType::storeClassAttributeContent | ( |  | $classAttribute,
|  |  | $content
| ) |  |

Definition at line 152 of file ezcountrytype.php.

Referenced by preStoreClassAttribute().

## ◆ storeObjectAttribute()

eZCountryType::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 279 of file ezcountrytype.php.

## ◆ supportsBatchInitializeObjectAttribute()

eZCountryType::supportsBatchInitializeObjectAttribute | ( |  | ) |

Reimplemented from eZDataType.

Definition at line 454 of file ezcountrytype.php.

## ◆ title()

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

Returns the country for use as a title

Reimplemented from eZDataType.

Definition at line 387 of file ezcountrytype.php.

## ◆ toString()

eZCountryType::toString | ( |  | $contentObjectAttribute | ) |

Returns
  string representation of an contentobjectattribute data for simplified export

Reimplemented from eZDataType.

Definition at line 374 of file ezcountrytype.php.

## ◆ validateCollectionAttributeHTTPInput()

eZCountryType::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 201 of file ezcountrytype.php.

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

## ◆ validateObjectAttributeHTTPInput()

eZCountryType::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 183 of file ezcountrytype.php.

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

## Member Data Documentation

## ◆ DATA_TYPE_STRING

const eZCountryType::DATA_TYPE_STRING = 'ezcountry'

Definition at line 24 of file ezcountrytype.php.

## ◆ DEFAULT_LIST_FIELD

const eZCountryType::DEFAULT_LIST_FIELD = 'data_text5'

Definition at line 26 of file ezcountrytype.php.

## ◆ MULTIPLE_CHOICE_FIELD

const eZCountryType::MULTIPLE_CHOICE_FIELD = 'data_int1'

Definition at line 28 of file ezcountrytype.php.

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

- ezcountrytype.php

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