Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

Public Member Functions | Static Public Member Functions | Public Attributes | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
eZContentObjectState Class Reference
Inheritance diagram for eZContentObjectState:

## Public Member Functions
| currentTranslation ()
| setCurrentLanguage ( $locale)
| allTranslations ()
| translationByLocale ( $locale)
| translations ()
| languages ()
| availableLanguages ()
| store ( $fieldFilters=null)
| defaultLanguage ()
| isValid (&$messages=array())
| group ()
| fetchHTTPPersistentVariables ()
| objectCount ()
Public Member Functions inherited from eZPersistentObject
| __construct ( $row=null)
| eZPersistentObject ( $row=null)
| fill ( $row)
| remove ( $conditions=null, $extraConditions=null)
| sync ( $fieldFilters=null)
| attributes ()
| hasAttribute ( $attr)
| attribute ( $attr, $noFunction=false)
| setAttribute ( $attr, $val)
| hasDirtyData ()
| setHasDirtyData ( $hasDirtyData)

## Static Public Member Functions
static | definition ()
static | fetchById ( $id)
static | fetchByIdentifier ( $identifier, $groupID)
static | fetchByGroup ( $groupID, $limit=false, $offset=false)
static | limitationList ()
static | defaults ()
static | cleanDefaultsCache ()
static | removeByID ( $id)
Static Public Member Functions inherited from eZPersistentObject
static | replaceFieldsWithShortNames (eZDBInterface $db, array $fieldDefs, &$fields)
static | count ( $def, $conds=null, $field=null)
static | fetchObject ( $def, $field_filters, $conds, $asObject=true, $grouping=null, $custom_fields=null)
static | removeObject ( $def, $conditions=null, $extraConditions=null)
static | storeObject ( $obj, $fieldFilters=null)
static | conditionText ( $conditions)
static | conditionTextByRow ( $conditions, $row)
static | fetchObjectList ( $def, $field_filters=null, $conds=null, $sorts=null, $limit=null, $asObject=true, $grouping=false, $custom_fields=null, $custom_tables=null, $custom_conds=null)
static | handleRows ( $rows, $class_name, $asObject)
static | swapRow ( $table, $keys, $order_id, $rows, $id1, $id2)
static | newObjectOrder ( $def, $orderField, $conditions)
static | reorderObject ( $def, $orderField, $conditions, $down=true)
static | escapeArray ( $array)
static | updateObjectList ( $parameters)
static | getShortAttributeName ( $db, $def, $attrName)

## Public Attributes
| $DefaultLanguageID
| $GroupID
const | MAX_IDENTIFIER_LENGTH = 45
Public Attributes inherited from eZPersistentObject
| $PersistentDataDirty
| $ID
| $ContentObjectID
| $SectionID
| $OwnerID
| $ClassID
| $Published
| $Modified
| $CurrentVersion
| $Status
| $RemoteID
| $LanguageMask
| $InitialLanguageID
| $NodeID
| $ParentNodeID
| $MainNodeID
| $ContentObjectVersion
| $ContentObjectIsPublished
| $Depth
| $SortField
| $SortOrder
| $Priority
| $ModifiedSubNode
| $PathString
| $PathIdentificationString
| $IsHidden
| $IsInvisible
| $UserID
| $Name
| $Locale
| $Identifier
| $NavigationPartIdentifier
| $SerializedDescriptionList
| $URLAliasName
| $AlwaysAvailable
| $CanTranslate
| $DataInt1
| $DataInt2
| $DataInt3
| $DataInt4
| $DataFloat1
| $DataFloat2
| $DataFloat3
| $DataFloat4
| $DataText1
| $DataText2
| $DataText3
| $DataText4
| $DataText5
| $SerializedDataText
| $Category
| $PolicyID
| $Values
| $Created
| $CurrencyCode
| $ProductCollectionID
| $ItemCount
| $Price
| $IsVATIncluded
| $VATValue
| $DiscountValue
| $Email
| $IsTemporary
| $IsArchived
| $IsActive
| $OrderID
| $ModifierID
| $Code
| $Symbol
| $AutoRateValue
| $CustomRateValue
| $RateFactor
| $Main
| $MementoKey
| $MainKey
| $WorkflowEventPos
| $LanguageID
| $ContentObjectStateGroupID
| $contentobject_attribute_id
| $contentobject_id
| $rating
| $rating_count
| $rating_average

## Private Member Functions
| setLanguageObject (eZContentObjectStateLanguage $stateLanguage)

## Static Private Member Functions
static | fetchByConditions ( $conditions, $limit, $offset)

## Private Attributes
| $LanguageObject
| $Translations
| $AllTranslations

## Static Private Attributes
static | $Defaults = null

## Additional Inherited Members
Static Protected Member Functions inherited from eZPersistentObject
static | replaceFieldsWithLongNames (eZDBInterface $db, array $fieldDefs, &$fields)

## Detailed Description

Definition at line 18 of file ezcontentobjectstate.php.

## Member Function Documentation

## ◆ allTranslations()

eZContentObjectState::allTranslations | ( |  | ) |

Returns
  array an array of eZContentObjectStateLanguage objects, representing all possible translations of this content object state

Definition at line 201 of file ezcontentobjectstate.php.

References $AllTranslations, eZPersistentObject\$ID, $language, $row, $translation, eZContentLanguage\fetchList(), and translations().

Referenced by fetchHTTPPersistentVariables(), and translationByLocale().

## ◆ availableLanguages()

eZContentObjectState::availableLanguages | ( |  | ) |

Returns
  array the languages the state exists in, as an array with language code strings.

Definition at line 284 of file ezcontentobjectstate.php.

References languages().

## ◆ cleanDefaultsCache()

static eZContentObjectState::cleanDefaultsCache | ( |  | ) |
| static

Cleans the cache used by eZContentObjectState::defaults().

Definition at line 532 of file ezcontentobjectstate.php.

Referenced by eZContentObjectStateGroup\removeStatesByID().

## ◆ currentTranslation()

eZContentObjectState::currentTranslation | ( |  | ) |

Return the current translation of the content object state

Returns
  eZContentObjectStateLanguage

Definition at line 169 of file ezcontentobjectstate.php.

References $LanguageObject.

## ◆ defaultLanguage()

eZContentObjectState::defaultLanguage | ( |  | ) |

Returns
  int the numerical ID of the default language

Definition at line 402 of file ezcontentobjectstate.php.

References eZContentLanguage\fetch().

## ◆ defaults()

static eZContentObjectState::defaults | ( |  | ) |
| static

The defaults are cached in a static class variable, so subsequent calls to this method do not require queries to the database each time. To clear this cache use eZContentObjectState::cleanDefaultsCache().

Returns
  array an array of all default content object states

Definition at line 519 of file ezcontentobjectstate.php.

References $Defaults, and eZPersistentObject\fetchObjectList().

## ◆ definition()

static eZContentObjectState::definition | ( |  | ) |
| static

Returns the definition for the object, the default implementation is to return an empty array. It's upto each inheriting class to return a proper definition array.

The definition array is an associative array consists of these keys:

- fields: an associative array of fields which defines which database field (the key) is to fetched and how they map to object member variables (the value).
- keys: an array of fields which is used for uniquely identifying the object in the table.
- function_attributes: an associative array of attributes which maps to member functions, used for fetching data with functions.
- set_functions: an associative array of attributes which maps to member functions, used for setting data with functions.
- increment_key: the field which is incremented on table inserts.
- class_name: the classname which is used for instantiating new objecs when fetching from the database.
- sort: an associative array which defines the default sorting of lists, the key is the table field while the value is the sorting method which is either 'asc' or 'desc'.
- name: the name of the database table

Example: `public static function definition() { return array( "fields" => array( "id" => "ID", "version" => "Version", "name" => "Name" ), "keys" => array( "id", "version" ), "function_attributes" => array( "current" => "currentVersion", "class_name" => "className" ), "increment_key" => "id", "class_name" => "eZContentClass", "sort" => array( "id" => "asc" ), "name" => "ezcontentclass" ); }`

Returns
  array

Reimplemented from eZPersistentObject.

Definition at line 24 of file ezcontentobjectstate.php.

Referenced by fetchHTTPPersistentVariables(), and removeByID().

## ◆ fetchByConditions()

static eZContentObjectState::fetchByConditions | ( |  | $conditions,
|  |  | $limit,
|  |  | $offset
| ) |  |
| static private

Fetches content object states by conditions.

The content object states are fetched in the right language, depending on the list of prioritized languages of the site access.

Parameters

  $conditions |
  $limit |
  $offset |

Returns
  array

Definition at line 107 of file ezcontentobjectstate.php.

References $db, $limit, $offset, $row, $rows, $states, eZContentLanguage\languagesSQLFilter(), and eZContentLanguage\sqlFilter().

Referenced by fetchByGroup(), fetchById(), and fetchByIdentifier().

## ◆ fetchByGroup()

static eZContentObjectState::fetchByGroup | ( |  | $groupID,
|  |  | $limit = `false`,
|  |  | $offset = `false`
| ) |  |
| static

Fetches all content object states of a content object state group

Parameters

  integer | $groupID |
  integer | $limit |
  integer | $ofset |

Returns
  array

Definition at line 150 of file ezcontentobjectstate.php.

References $groupID, $limit, $offset, and fetchByConditions().

Referenced by eZContentObjectStateGroup\removeByID(), and eZContentObjectStateGroup\states().

## ◆ fetchById()

static eZContentObjectState::fetchById | ( |  | $id | ) |
| static

Fetches a content object state by its numerical ID.

Parameters

  integer | $id | the numerical ID of the content object state

Returns
  eZContentObjectState|boolean an instance of eZContentObjectState, or false if the requested state does not exist

Definition at line 71 of file ezcontentobjectstate.php.

References $id, $states, eZPersistentObject\count(), and fetchByConditions().

## ◆ fetchByIdentifier()

static eZContentObjectState::fetchByIdentifier | ( |  | $identifier,
|  |  | $groupID
| ) |  |
| static

Fetches a content object state by its identifier and group ID

Parameters

  string | $identifier | the identifier of the content object state, which is unique per content object state group
  integer | $groupID | the numerical ID of the content object state group

Returns
  eZContentObjectState|boolean an instance of eZContentObjectState, or false if the requested state does not exist

Definition at line 87 of file ezcontentobjectstate.php.

References $db, $states, eZPersistentObject\count(), and fetchByConditions().

Referenced by isValid(), and eZContentObjectStateGroup\stateByIdentifier().

## ◆ fetchHTTPPersistentVariables()

eZContentObjectState::fetchHTTPPersistentVariables | ( |  | ) |

Fetches the HTTP persistent variables for this content object state and its localizations.

"ContentObjectState" is used as base name for the persistent variables.

See also
  eZHTTPPersistence

Definition at line 544 of file ezcontentobjectstate.php.

References $http, allTranslations(), definition(), and eZContentObjectStateLanguage\definition().

## ◆ group()

eZContentObjectState::group | ( |  | ) |

Definition at line 485 of file ezcontentobjectstate.php.

References eZContentObjectStateGroup\fetchById().

## ◆ isValid()

eZContentObjectState::isValid | ( | & | $messages = `array()` | ) |

Checks if all data is valid and can be stored to the database.

Parameters

  array | &$messages |

Returns
  boolean true when valid, false when not valid

See also
  eZContentObjectState::store()

Definition at line 414 of file ezcontentobjectstate.php.

References $messages, $translation, fetchByIdentifier(), and eZCharTransform\instance().

## ◆ languages()

eZContentObjectState::languages | ( |  | ) |

Retrieves the languages this content object state is translated into

Returns
  array an array of eZContentLanguage instances

Definition at line 275 of file ezcontentobjectstate.php.

References eZContentLanguage\prioritizedLanguagesByMask().

Referenced by availableLanguages().

## ◆ limitationList()

static eZContentObjectState::limitationList | ( |  | ) |
| static

Get the list of content object states that is used to create the object state limitation list in the policy/edit view

Returns
  array

Definition at line 495 of file ezcontentobjectstate.php.

References $db, $row, and $rows.

## ◆ objectCount()

eZContentObjectState::objectCount | ( |  | ) |

Returns
  integer The count of objects that have this content object state

Definition at line 573 of file ezcontentobjectstate.php.

References $db, eZPersistentObject\$ID, $id, and $result.

## ◆ removeByID()

static eZContentObjectState::removeByID | ( |  | $id | ) |
| static

Removes a content object state by its numerical ID

This method should not be used directly, instead use eZContentObjectStateGroup::removeStatesByID().

Parameters

  integer | $id | the numerical ID of the content object state

Definition at line 560 of file ezcontentobjectstate.php.

References $db, $id, definition(), eZContentObjectStateLanguage\definition(), and eZPersistentObject\removeObject().

Referenced by eZContentObjectStateGroup\removeByID(), and eZContentObjectStateGroup\removeStatesByID().

## ◆ setCurrentLanguage()

eZContentObjectState::setCurrentLanguage | ( |  | $locale | ) |

Sets the current language

Parameters

  string | $locale | the locale code

Returns
  boolean true if the language was found and set, false if the language was not found

Definition at line 180 of file ezcontentobjectstate.php.

References $lang, $locale, $translation, eZContentLanguage\fetchByLocale(), setLanguageObject(), and translations().

## ◆ setLanguageObject()

eZContentObjectState::setLanguageObject | ( | eZContentObjectStateLanguage | $stateLanguage | ) |
| private

Parameters

  eZContentObjectStateLanguage | $stateLanguage |

Definition at line 159 of file ezcontentobjectstate.php.

Referenced by setCurrentLanguage().

## ◆ store()

eZContentObjectState::store | ( |  | $fieldFilters = `null` | ) |

Stores the content object state and its translations.

Before storing a content object state, you should use eZContentObjectState::isValid() to check its validness.

Parameters

  array | $fieldFilters |

Reimplemented from eZPersistentObject.

Definition at line 305 of file ezcontentobjectstate.php.

References $db, eZPersistentObject\$ID, $rows, $translation, eZPersistentObject\count(), eZPersistentObject\setAttribute(), and eZPersistentObject\storeObject().

## ◆ translationByLocale()

eZContentObjectState::translationByLocale | ( |  | $locale | ) |

Definition at line 233 of file ezcontentobjectstate.php.

References $locale, $translation, allTranslations(), and eZContentLanguage\idByLocale().

## ◆ translations()

eZContentObjectState::translations | ( |  | ) |

Returns
  an array of eZContentObjectStateLanguage objects, representing all available translations of this content object state

Definition at line 257 of file ezcontentobjectstate.php.

References $Translations, and eZContentObjectStateLanguage\fetchByState().

Referenced by allTranslations(), and setCurrentLanguage().

## Member Data Documentation

## ◆ $AllTranslations

eZContentObjectState::$AllTranslations
| private

Definition at line 583 of file ezcontentobjectstate.php.

Referenced by allTranslations().

## ◆ $DefaultLanguageID

eZContentObjectState::$DefaultLanguageID

Definition at line 20 of file ezcontentobjectstate.php.

## ◆ $Defaults

eZContentObjectState::$Defaults = null
| static private

Definition at line 584 of file ezcontentobjectstate.php.

Referenced by defaults().

## ◆ $GroupID

eZContentObjectState::$GroupID

Definition at line 21 of file ezcontentobjectstate.php.

## ◆ $LanguageObject

eZContentObjectState::$LanguageObject
| private

Definition at line 581 of file ezcontentobjectstate.php.

Referenced by currentTranslation().

## ◆ $Translations

eZContentObjectState::$Translations
| private

Definition at line 582 of file ezcontentobjectstate.php.

Referenced by translations().

## ◆ MAX_IDENTIFIER_LENGTH

const eZContentObjectState::MAX_IDENTIFIER_LENGTH = 45

Definition at line 22 of file ezcontentobjectstate.php.

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

- ezcontentobjectstate.php

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