eZ Publish  [trunk]
eZContentObjectStateGroup Class Reference
+ Inheritance diagram for eZContentObjectStateGroup:
+ Collaboration diagram for eZContentObjectStateGroup:

List of all members.

Public Member Functions

 __construct ($row=array())
 allTranslations ()
 availableLanguages ()
 Get the languages the state group exists in.
 currentTranslation ()
 defaultLanguage ()
 fetchHTTPPersistentVariables ()
 Fetches the HTTP persistent variables for this content object state group and its localizations.
 isInternal ()
 isValid (&$messages=array())
 Checks if all data is valid and can be stored to the database.
 languages ()
 Get the languages the state group exists in.
 newState ($identifier=null)
 Creates a new content object state in this content object state group.
 removeStatesByID ($idList)
 reorderStates ($stateIDList)
 setCurrentLanguage ($locale)
 stateByIdentifier ($stateIdentifier)
 states ($refreshMemberVariable=false)
 store ($fieldFilters=null)
 Stores the content object state group and its translations.
 translationByLocale ($locale)
 translations ()

Static Public Member Functions

static definition ()
 Returns the definition for the object, the default implementation is to return an empty array.
static fetchById ($id)
 Fetches a content object state group by its numerical ID.
static fetchByIdentifier ($identifier)
 Fetches a content object state group by its identifier.
static fetchByOffset ($limit, $offset)
static limitations ()
 Returns an array of limitations useable by the policy system.
static limitationValues ($groupID)
 Returns an array of limitation values useable by the policy system.
static removeByID ($id)

Public Attributes

const MAX_IDENTIFIER_LENGTH = 45

Static Public Attributes

static $allowInternalCUD = false

Private Member Functions

 setLanguageObject (eZContentObjectStateGroupLanguage $stateGroupLanguage)

Static Private Member Functions

static fetchByConditions ($conditions, $limit, $offset)
 Fetches content object state groups by certain conditions.

Private Attributes

 $AllTranslations
 $LanguageObject
 $States
 $Translations

Detailed Description

Definition at line 17 of file ezcontentobjectstategroup.php.


Constructor & Destructor Documentation

Definition at line 28 of file ezcontentobjectstategroup.php.


Member Function Documentation

Get the languages the state group exists in.

Returns:
array an array of language code strings.

Definition at line 277 of file ezcontentobjectstategroup.php.

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 33 of file ezcontentobjectstategroup.php.

Referenced by fetchHTTPPersistentVariables(), and removeByID().

static eZContentObjectStateGroup::fetchByConditions ( conditions,
limit,
offset 
) [static, private]

Fetches content object state groups by certain conditions.

Parameters:
array$conditions
integer$limit
integer$offset
Returns:
array

Definition at line 101 of file ezcontentobjectstategroup.php.

Referenced by fetchById(), fetchByIdentifier(), fetchByOffset(), and limitations().

static eZContentObjectStateGroup::fetchById ( id) [static]

Fetches a content object state group by its numerical ID.

Parameters:
integer$id
Returns:
eZContentObjectStateGroup|boolean

Definition at line 71 of file ezcontentobjectstategroup.php.

Referenced by limitationValues().

static eZContentObjectStateGroup::fetchByIdentifier ( identifier) [static]

Fetches a content object state group by its identifier.

Parameters:
string$identifier
Returns:
eZContentObjectStateGroup|boolean

Definition at line 84 of file ezcontentobjectstategroup.php.

Referenced by eZContentObjectTreeNode\createSortingSQLStrings(), isValid(), and stateByIdentifier().

static eZContentObjectStateGroup::fetchByOffset ( limit,
offset 
) [static]
Parameters:
int$limit
int$offset
Returns:
array

Definition at line 140 of file ezcontentobjectstategroup.php.

Referenced by eZContentObject\allowedAssignStateList().

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

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

See also:
eZHTTPPersistence

Definition at line 484 of file ezcontentobjectstategroup.php.

eZContentObjectStateGroup::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:
eZContentObjectStateGroup::store()

Definition at line 381 of file ezcontentobjectstategroup.php.

Get the languages the state group exists in.

Returns:
array an array of eZContentLanguage instances

Definition at line 267 of file ezcontentobjectstategroup.php.

Referenced by availableLanguages().

Returns an array of limitations useable by the policy system.

Returns:
array

Definition at line 646 of file ezcontentobjectstategroup.php.

static eZContentObjectStateGroup::limitationValues ( groupID) [static]

Returns an array of limitation values useable by the policy system.

Parameters:
integer$groupID
Returns:
array

Definition at line 708 of file ezcontentobjectstategroup.php.

eZContentObjectStateGroup::newState ( identifier = null)

Creates a new content object state in this content object state group.

Parameters:
string$identifieridentifier for the new state group
Returns:
eZContentObjectState the new content object state

Definition at line 625 of file ezcontentobjectstategroup.php.

static eZContentObjectStateGroup::removeByID ( id) [static]
Parameters:
integer$id

Definition at line 498 of file ezcontentobjectstategroup.php.

Referenced by removeStatesByID().

Parameters:
array$idList

Definition at line 517 of file ezcontentobjectstategroup.php.

Parameters:
array$stateIDList
Returns:
boolean

Definition at line 577 of file ezcontentobjectstategroup.php.

Parameters:
string$locale
Returns:
boolean

Definition at line 171 of file ezcontentobjectstategroup.php.

Parameters:
eZContentObjectStateGroupLanguage$stateGroupLanguage

Definition at line 150 of file ezcontentobjectstategroup.php.

Referenced by setCurrentLanguage().

Definition at line 636 of file ezcontentobjectstategroup.php.

eZContentObjectStateGroup::states ( refreshMemberVariable = false)
Parameters:
boolean$refreshMemberVariable
Returns:
array

Definition at line 463 of file ezcontentobjectstategroup.php.

Referenced by removeStatesByID(), and reorderStates().

eZContentObjectStateGroup::store ( fieldFilters = null)

Stores the content object state group and its translations.

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

Parameters:
array$fieldFilters

Reimplemented from eZPersistentObject.

Definition at line 298 of file ezcontentobjectstategroup.php.

Returns:
array

Definition at line 249 of file ezcontentobjectstategroup.php.

Referenced by allTranslations(), and setCurrentLanguage().


Member Data Documentation

eZContentObjectStateGroup::$allowInternalCUD = false [static]

Definition at line 26 of file ezcontentobjectstategroup.php.

eZContentObjectStateGroup::$AllTranslations [private]

Definition at line 728 of file ezcontentobjectstategroup.php.

eZContentObjectStateGroup::$LanguageObject [private]

Definition at line 726 of file ezcontentobjectstategroup.php.

eZContentObjectStateGroup::$States [private]

Definition at line 729 of file ezcontentobjectstategroup.php.

eZContentObjectStateGroup::$Translations [private]

Definition at line 727 of file ezcontentobjectstategroup.php.


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