kernel/private/classes/ezcontentobjectstate.php
File containing the eZContentObjectState class.
- Copyright
- Copyright (C) 1999-2011 eZ Systems AS. All rights reserved.
- License
- eZ Business Use License Agreement Version 2.0
- Package
- kernel
- Version
- 4.6.0
\eZContentObjectState
Class representing a content object state
- Parent(s)
- \eZPersistentObject
- Copyright
- Copyright (C) 1999-2011 eZ Systems AS. All rights reserved.
- Version
- 4.6.0
Constants
Properties


$PersistentDataDirty= ''
- Type
- n/a
- Inherited_from
- \eZPersistentObject::$$PersistentDataDirty
Methods


allTranslations(
)
:
array
Type | Description |
---|---|
array | an array of eZContentObjectStateLanguage objects, representing all possible translations of this content object state |


attribute(
$attr, $noFunction
=
false
)
:
void
Name | Type | Description |
---|---|---|
$attr | ||
$noFunction |


availableLanguages(
)
:
array
Type | Description |
---|---|
array | the languages the state exists in, as an array with language code strings. |


cleanDefaultsCache(
)
:
void
Cleans the cache used by {@link eZContentObjectState::defaults()}.


count(
$def, $conds
=
null, $field
=
null
)
:
void
Name | Type | Description |
---|---|---|
$def | ||
$conds | ||
$field |


currentTranslation(
)
:
\eZContentObjectStateLanguage
Return the current translation of the content object state
Type | Description |
---|---|
\eZContentObjectStateLanguage |


defaults(
)
:
array
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 {@link eZContentObjectState::cleanDefaultsCache()}.
Type | Description |
---|---|
array | an array of all default content object states |


eZPersistentObject(
$row
)
:
void
Name | Type | Description |
---|---|---|
$row |


fetchByConditions(
$conditions, $limit, $offset
)
:
array
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.
Name | Type | Description |
---|---|---|
$conditions | ||
$limit | ||
$offset |
Type | Description |
---|---|
array |


fetchByGroup(
integer $groupID, integer $limit
=
false, $offset
=
false
)
:
array
Fetches all content object states of a content object state group
Name | Type | Description |
---|---|---|
$groupID | integer | |
$limit | integer | |
$offset |
Type | Description |
---|---|
array |


fetchById(
integer $id
)
:
\eZContentObjectState | boolean
Fetches a content object state by its numerical ID.
Name | Type | Description |
---|---|---|
$id | integer | the numerical ID of the content object state |
Type | Description |
---|---|
\eZContentObjectState | boolean | an instance of eZContentObjectState, or false if the requested state does not exist |


fetchByIdentifier(
string $identifier, integer $groupID
)
:
\eZContentObjectState | boolean
Fetches a content object state by its identifier and group ID
Name | Type | Description |
---|---|---|
$identifier | string | the identifier of the content object state, which is unique per content object state group |
$groupID | integer | the numerical ID of the content object state group |
Type | Description |
---|---|
\eZContentObjectState | boolean | an instance of eZContentObjectState, or false if the requested state does not exist |


fetchHTTPPersistentVariables(
)
:
void
Fetches the HTTP persistent variables for this content object state and its localizations.
"ContentObjectState" is used as base name for the persistent variables.


fetchObject(
$def, $field_filters, $conds, $asObject
=
true, $grouping
=
null, $custom_fields
=
null
)
:
void
Name | Type | Description |
---|---|---|
$def | ||
$field_filters | ||
$conds | ||
$asObject | ||
$grouping | ||
$custom_fields |


fetchObjectList(
$def, $field_filters
=
null, $conds
=
null, $sorts
=
null, $limit
=
null, $asObject
=
true, $grouping
=
false, $custom_fields
=
null, $custom_tables
=
null, $custom_conds
=
null
)
:
void
Name | Type | Description |
---|---|---|
$def | ||
$field_filters | ||
$conds | ||
$sorts | ||
$limit | ||
$asObject | ||
$grouping | ||
$custom_fields | ||
$custom_tables | ||
$custom_conds |


fill(
$row
)
:
void
Name | Type | Description |
---|---|---|
$row |


getShortAttributeName(
$db, $def, $attrName
)
:
void
Name | Type | Description |
---|---|---|
$db | ||
$def | ||
$attrName |


handleRows(
$rows, $class_name, $asObject
)
:
void
Name | Type | Description |
---|---|---|
$rows | ||
$class_name | ||
$asObject |


hasAttribute(
$attr
)
:
void
Name | Type | Description |
---|---|---|
$attr |


isValid(
array $messages
=
array()
)
:
boolean
Checks if all data is valid and can be stored to the database.
Name | Type | Description |
---|---|---|
$messages | array | &$messages |
Type | Description |
---|---|
boolean | true when valid, false when not valid |


languages(
)
:
array
Retrieves the languages this content object state is translated into
Type | Description |
---|---|
array | an array of eZContentLanguage instances |


limitationList(
)
:
array
Get the list of content object states that is used to create the object state limitation list in the policy/edit view
Type | Description |
---|---|
array |


newObjectOrder(
$def, $orderField, $conditions
)
:
void
Name | Type | Description |
---|---|---|
$def | ||
$orderField | ||
$conditions |


objectCount(
)
:
integer
Type | Description |
---|---|
integer | The count of objects that have this content object state |


remove(
$conditions
=
null, $extraConditions
=
null
)
:
void
Name | Type | Description |
---|---|---|
$conditions | ||
$extraConditions |


removeByID(
integer $id
)
:
void
Removes a content object state by its numerical ID
This method should not be used directly, instead use {@link eZContentObjectStateGroup::removeStatesByID()}.
Name | Type | Description |
---|---|---|
$id | integer | the numerical ID of the content object state |


removeObject(
$def, $conditions
=
null, $extraConditions
=
null
)
:
void
Name | Type | Description |
---|---|---|
$def | ||
$conditions | ||
$extraConditions |


reorderObject(
$def, $orderField, $conditions, $down
=
true
)
:
void
Name | Type | Description |
---|---|---|
$def | ||
$orderField | ||
$conditions | ||
$down |


replaceFieldsWithShortNames(
$db, $fieldDefs, $fields
)
:
void
Name | Type | Description |
---|---|---|
$db | ||
$fieldDefs | ||
$fields |


setAttribute(
$attr, $val
)
:
void
Name | Type | Description |
---|---|---|
$attr | ||
$val |


setCurrentLanguage(
string $locale
)
:
boolean
Sets the current language
Name | Type | Description |
---|---|---|
$locale | string | the locale code |
Type | Description |
---|---|
boolean | true if the language was found and set, false if the language was not found |


setHasDirtyData(
$hasDirtyData
)
:
void
Name | Type | Description |
---|---|---|
$hasDirtyData |


setLanguageObject(
\eZContentObjectStateLanguage $stateLanguage
)
:
void
Name | Type | Description |
---|---|---|
$stateLanguage | \eZContentObjectStateLanguage |


store(
array $fieldFilters
=
null
)
:
void
Stores the content object state and its translations.
Before storing a content object state, you should use {@link eZContentObjectState::isValid()} to check its validness.
Name | Type | Description |
---|---|---|
$fieldFilters | array |


storeObject(
$obj, $fieldFilters
=
null
)
:
void
Name | Type | Description |
---|---|---|
$obj | ||
$fieldFilters |


swapRow(
$table, $keys, $order_id, $rows, $id1, $id2
)
:
void
Name | Type | Description |
---|---|---|
$table | ||
$keys | ||
$order_id | ||
$rows | ||
$id1 | ||
$id2 |


sync(
$fieldFilters
=
null
)
:
void
Name | Type | Description |
---|---|---|
$fieldFilters |


translations(
)
:
\an
Type | Description |
---|---|
\an | array of eZContentObjectStateLanguage objects, representing all available translations of this content object state |