Exponential 6.0.13 Exponential Enterprise Open Source CMS - PHP Class Reference

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

## Public Member Functions
| __construct ( $serializedNamesString=false)
| initFromSerializedList ( $serializedNamesString)
| initFromString ( $nameString, $languageLocale=false)
| initDefault ()
| create ( $serializedNamesString=false)
| __clone ()
| copy ( $serializedObjectNameListObject)
| mergeNameList ( $inNameList)
| serializeNames ()
| isEmpty ()
| unserializeNames ( $serializedNamesString)
| alwaysAvailableLanguageID ()
| alwaysAvailableLanguageLocale ()
| alwaysAvailableLanguage ()
| languageMask ()
| name ( $languageLocale=false)
| nameByPrioritizedLanguages ()
| nameByLanguageLocale ( $languageLocale)
| alwaysAvailableName ()
| setAlwaysAvailableLanguage ( $languageLocale)
| updateAlwaysAvailable ( $alwaysAvailableLocale=false)
| hasNameInLocale ( $languageLocale)
| setName ( $name, $languageLocale=false)
| setNameByLanguageLocale ( $name, $languageLocale)
| appendGroupName ( $appendString)
| hasDirtyData ()
| setHasDirtyData ( $hasDirtyData=true)
| nameList ()
| cleanNameList ()
| nameListCount ()
| setNameList ( $nameListArray)
| resetNameList ()
| removeName ( $languageLocale)
| defaultLanguageLocale ()
| defaultLanguage ()
| setDefaultLanguage ( $language)
| setDefaultLanguageByLocale ( $languageLocale, $createIfNotExist=true)
| topPriorityLanguageLocale ()
| topPriorityLanguage ()
| prioritizedLanguages ()
| prioritizedLanguagesJsArray ()
| languageLocaleList ()
| languages ()
| untranslatedLanguages ()
| normalize ( $languageInfo)
| validate ( $param=true)

## Static Public Member Functions
static | nameFromSerializedString ( $serializedNames, $languageLocale=false)

## Public Attributes
| $nameList
const | ALWAYS_AVAILABLE_STR = 'always-available'
| $NameList
| $HasDirtyData
| $DefaultLanguage

## Detailed Description

Definition at line 11 of file ezserializedobjectnamelist.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZSerializedObjectNameList::__construct | ( |  | $serializedNamesString = `false` | ) |

Reimplemented in eZContentClassNameList.

Definition at line 16 of file ezserializedobjectnamelist.php.

References initFromSerializedList().

## Member Function Documentation

## ◆ __clone()

eZSerializedObjectNameList::__clone | ( |  | ) |

Definition at line 51 of file ezserializedobjectnamelist.php.

## ◆ alwaysAvailableLanguage()

eZSerializedObjectNameList::alwaysAvailableLanguage | ( |  | ) |

Definition at line 107 of file ezserializedobjectnamelist.php.

References ALWAYS_AVAILABLE_STR, and eZContentLanguage\fetchByLocale().

Referenced by prioritizedLanguages(), and topPriorityLanguage().

## ◆ alwaysAvailableLanguageID()

eZSerializedObjectNameList::alwaysAvailableLanguageID | ( |  | ) |

Definition at line 93 of file ezserializedobjectnamelist.php.

References alwaysAvailableLanguageLocale(), and eZContentLanguage\idByLocale().

## ◆ alwaysAvailableLanguageLocale()

eZSerializedObjectNameList::alwaysAvailableLanguageLocale | ( |  | ) |

Definition at line 101 of file ezserializedobjectnamelist.php.

References ALWAYS_AVAILABLE_STR.

Referenced by alwaysAvailableLanguageID(), and updateAlwaysAvailable().

## ◆ alwaysAvailableName()

eZSerializedObjectNameList::alwaysAvailableName | ( |  | ) |

Definition at line 165 of file ezserializedobjectnamelist.php.

References ALWAYS_AVAILABLE_STR, and nameByLanguageLocale().

Referenced by nameByPrioritizedLanguages().

## ◆ appendGroupName()

eZSerializedObjectNameList::appendGroupName | ( |  | $appendString | ) |

Appends $appendString string to each name in NameList.

Definition at line 255 of file ezserializedobjectnamelist.php.

References ALWAYS_AVAILABLE_STR.

## ◆ cleanNameList()

eZSerializedObjectNameList::cleanNameList | ( |  | ) |

Same as 'nameList()' but without 'always-available' entry.

Definition at line 299 of file ezserializedobjectnamelist.php.

References $nameList, ALWAYS_AVAILABLE_STR, and nameList().

## ◆ copy()

eZSerializedObjectNameList::copy | ( |  | $serializedObjectNameListObject | ) |

Definition at line 55 of file ezserializedobjectnamelist.php.

References defaultLanguage(), hasDirtyData(), and nameList().

## ◆ create()

eZSerializedObjectNameList::create | ( |  | $serializedNamesString = `false` | ) |

Reimplemented in eZContentClassNameList.

Definition at line 45 of file ezserializedobjectnamelist.php.

## ◆ defaultLanguage()

eZSerializedObjectNameList::defaultLanguage | ( |  | ) |

Definition at line 341 of file ezserializedobjectnamelist.php.

References $DefaultLanguage, and eZContentLanguage\topPriorityLanguage().

Referenced by copy(), and defaultLanguageLocale().

## ◆ defaultLanguageLocale()

eZSerializedObjectNameList::defaultLanguageLocale | ( |  | ) |

Definition at line 330 of file ezserializedobjectnamelist.php.

References defaultLanguage().

Referenced by initFromString().

## ◆ hasDirtyData()

eZSerializedObjectNameList::hasDirtyData | ( |  | ) |

Returns
  true if the data is considered dirty(e.g. names were changed)

Definition at line 277 of file ezserializedobjectnamelist.php.

References $HasDirtyData.

Referenced by copy(), and eZContentClassNameList\store().

## ◆ hasNameInLocale()

eZSerializedObjectNameList::hasNameInLocale | ( |  | $languageLocale | ) |

Definition at line 204 of file ezserializedobjectnamelist.php.

References eZDebug\writeWarning().

Referenced by nameByLanguageLocale(), nameByPrioritizedLanguages(), and updateAlwaysAvailable().

## ◆ initDefault()

eZSerializedObjectNameList::initDefault | ( |  | ) |

Definition at line 40 of file ezserializedobjectnamelist.php.

References initFromString().

## ◆ initFromSerializedList()

eZSerializedObjectNameList::initFromSerializedList | ( |  | $serializedNamesString | ) |

Definition at line 24 of file ezserializedobjectnamelist.php.

References unserializeNames().

Referenced by __construct(), and initFromString().

## ◆ initFromString()

eZSerializedObjectNameList::initFromString | ( |  | $nameString,
|  |  | $languageLocale = `false`
| ) |  |

Definition at line 30 of file ezserializedobjectnamelist.php.

References ALWAYS_AVAILABLE_STR, defaultLanguageLocale(), and initFromSerializedList().

Referenced by initDefault().

## ◆ isEmpty()

eZSerializedObjectNameList::isEmpty | ( |  | ) |

Definition at line 75 of file ezserializedobjectnamelist.php.

## ◆ languageLocaleList()

eZSerializedObjectNameList::languageLocaleList | ( |  | ) |

Definition at line 452 of file ezserializedobjectnamelist.php.

References ALWAYS_AVAILABLE_STR.

Referenced by languages(), prioritizedLanguages(), and topPriorityLanguage().

## ◆ languageMask()

eZSerializedObjectNameList::languageMask | ( |  | ) |

Definition at line 116 of file ezserializedobjectnamelist.php.

References ALWAYS_AVAILABLE_STR, and eZContentLanguage\idByLocale().

## ◆ languages()

eZSerializedObjectNameList::languages | ( |  | ) |

The same as 'languageLocaleList' but returns a list of 'eZContentLanguage' objects.

Returns
  array of language objects.

Definition at line 473 of file ezserializedobjectnamelist.php.

References eZContentLanguage\fetchByLocale(), and languageLocaleList().

## ◆ mergeNameList()

eZSerializedObjectNameList::mergeNameList | ( |  | $inNameList | ) |

Definition at line 62 of file ezserializedobjectnamelist.php.

References setHasDirtyData(), and setNameByLanguageLocale().

Referenced by normalize().

## ◆ name()

eZSerializedObjectNameList::name | ( |  | $languageLocale = `false` | ) |

Definition at line 135 of file ezserializedobjectnamelist.php.

References nameByLanguageLocale(), and nameByPrioritizedLanguages().

Referenced by setName().

## ◆ nameByLanguageLocale()

eZSerializedObjectNameList::nameByLanguageLocale | ( |  | $languageLocale | ) |

Definition at line 156 of file ezserializedobjectnamelist.php.

References hasNameInLocale().

Referenced by alwaysAvailableName(), name(), nameByPrioritizedLanguages(), and eZContentClassNameList\store().

## ◆ nameByPrioritizedLanguages()

eZSerializedObjectNameList::nameByPrioritizedLanguages | ( |  | ) |

Definition at line 140 of file ezserializedobjectnamelist.php.

References alwaysAvailableName(), hasNameInLocale(), nameByLanguageLocale(), and eZContentLanguage\prioritizedLanguages().

Referenced by name().

## ◆ nameFromSerializedString()

static eZSerializedObjectNameList::nameFromSerializedString | ( |  | $serializedNames,
|  |  | $languageLocale = `false`
| ) |  |
| static

Definition at line 267 of file ezserializedobjectnamelist.php.

References $nameList.

Referenced by eZInformationCollectionAttribute\contentClassAttributeName(), eZContentClass\descriptionFromSerializedString(), eZContentClass\nameFromSerializedString(), and eZContentClassAttribute\nameFromSerializedString().

## ◆ nameList()

eZSerializedObjectNameList::nameList | ( |  | ) |

Definition at line 291 of file ezserializedobjectnamelist.php.

References $NameList.

Referenced by cleanNameList(), copy(), nameListCount(), updateAlwaysAvailable(), and validate().

## ◆ nameListCount()

eZSerializedObjectNameList::nameListCount | ( |  | ) |

Definition at line 306 of file ezserializedobjectnamelist.php.

References nameList().

## ◆ normalize()

eZSerializedObjectNameList::normalize | ( |  | $languageInfo | ) |

Parameters

  $languageInfo. | languageInfo = array( 'map_table' => array( [<lang> => <to_lang>], [<lang> => 'skip_language'], .... ) );

Note: it's probably needed to call 'validate' after 'normalize'. 'normialize' doesnt' check whether language exist or not, cause you can have names in languages which are not in 'map_table', so you need to call 'validate' anyway.

Definition at line 516 of file ezserializedobjectnamelist.php.

References $nameList, mergeNameList(), resetNameList(), setNameByLanguageLocale(), and updateAlwaysAvailable().

## ◆ prioritizedLanguages()

eZSerializedObjectNameList::prioritizedLanguages | ( |  | ) |

Returns an array of languages in which contentclass has translations. However, if there is a name in language which is not listed as 'available' for siteaccess, that langugese will not be returned (except of 'always available' language).

Returns
  an array of language's locales.

Definition at line 418 of file ezserializedobjectnamelist.php.

References alwaysAvailableLanguage(), languageLocaleList(), and eZContentLanguage\prioritizedLanguagesByLocaleList().

Referenced by prioritizedLanguagesJsArray(), and untranslatedLanguages().

## ◆ prioritizedLanguagesJsArray()

eZSerializedObjectNameList::prioritizedLanguagesJsArray | ( |  | ) |

Definition at line 436 of file ezserializedobjectnamelist.php.

References prioritizedLanguages().

## ◆ removeName()

eZSerializedObjectNameList::removeName | ( |  | $languageLocale | ) |

Definition at line 321 of file ezserializedobjectnamelist.php.

References setHasDirtyData().

Referenced by validate().

## ◆ resetNameList()

eZSerializedObjectNameList::resetNameList | ( |  | ) |

Definition at line 316 of file ezserializedobjectnamelist.php.

References setNameList().

Referenced by normalize().

## ◆ serializeNames()

eZSerializedObjectNameList::serializeNames | ( |  | ) |

Definition at line 70 of file ezserializedobjectnamelist.php.

## ◆ setAlwaysAvailableLanguage()

eZSerializedObjectNameList::setAlwaysAvailableLanguage | ( |  | $languageLocale | ) |

Definition at line 176 of file ezserializedobjectnamelist.php.

References ALWAYS_AVAILABLE_STR, and setHasDirtyData().

Referenced by updateAlwaysAvailable().

## ◆ setDefaultLanguage()

eZSerializedObjectNameList::setDefaultLanguage | ( |  | $language | ) |

Definition at line 351 of file ezserializedobjectnamelist.php.

Referenced by setDefaultLanguageByLocale().

## ◆ setDefaultLanguageByLocale()

eZSerializedObjectNameList::setDefaultLanguageByLocale | ( |  | $languageLocale,
|  |  | $createIfNotExist = `true`
| ) |  |

Definition at line 356 of file ezserializedobjectnamelist.php.

References eZContentLanguage\fetchByLocale(), setDefaultLanguage(), and eZDebug\writeWarning().

## ◆ setHasDirtyData()

eZSerializedObjectNameList::setHasDirtyData | ( |  | $hasDirtyData = `true` | ) |

Sets whether the object has dirty data or not.

See also
  hasDirtyData, sync

Definition at line 286 of file ezserializedobjectnamelist.php.

Referenced by mergeNameList(), removeName(), setAlwaysAvailableLanguage(), setNameByLanguageLocale(), eZContentClassNameList\store(), and unserializeNames().

## ◆ setName()

eZSerializedObjectNameList::setName | ( |  | $name,
|  |  | $languageLocale = `false`
| ) |  |

Definition at line 222 of file ezserializedobjectnamelist.php.

References name(), setNameByLanguageLocale(), and topPriorityLanguageLocale().

Referenced by validate().

## ◆ setNameByLanguageLocale()

eZSerializedObjectNameList::setNameByLanguageLocale | ( |  | $name,
|  |  | $languageLocale
| ) |  |

Definition at line 232 of file ezserializedobjectnamelist.php.

References setHasDirtyData(), and eZDebug\writeWarning().

Referenced by mergeNameList(), normalize(), and setName().

## ◆ setNameList()

eZSerializedObjectNameList::setNameList | ( |  | $nameListArray | ) |

Definition at line 311 of file ezserializedobjectnamelist.php.

Referenced by resetNameList().

## ◆ topPriorityLanguage()

eZSerializedObjectNameList::topPriorityLanguage | ( |  | ) |

Returns top prioriry language for which there is translation according to siteaccess's available language list. If there is no translations for languages listed in siteaccess's available language list it returns 'always available' language.

Returns
  language object.

Definition at line 396 of file ezserializedobjectnamelist.php.

References alwaysAvailableLanguage(), languageLocaleList(), and eZContentLanguage\topPriorityLanguageByLocaleList().

Referenced by topPriorityLanguageLocale().

## ◆ topPriorityLanguageLocale()

eZSerializedObjectNameList::topPriorityLanguageLocale | ( |  | ) |

The same as 'topPriorityLanguage' but returns language locale.

Returns
  language locale.

Definition at line 377 of file ezserializedobjectnamelist.php.

References topPriorityLanguage().

Referenced by setName().

## ◆ unserializeNames()

eZSerializedObjectNameList::unserializeNames | ( |  | $serializedNamesString | ) |

Definition at line 80 of file ezserializedobjectnamelist.php.

References setHasDirtyData().

Referenced by initFromSerializedList().

## ◆ untranslatedLanguages()

eZSerializedObjectNameList::untranslatedLanguages | ( |  | ) |

Returns an array of languages for which translations don't exist.

Returns
  an array of languages. Each key in this array is 'language locale'.

Definition at line 489 of file ezserializedobjectnamelist.php.

References eZContentLanguage\prioritizedLanguages(), and prioritizedLanguages().

## ◆ updateAlwaysAvailable()

eZSerializedObjectNameList::updateAlwaysAvailable | ( |  | $alwaysAvailableLocale = `false` | ) |

Definition at line 190 of file ezserializedobjectnamelist.php.

References alwaysAvailableLanguageLocale(), hasNameInLocale(), nameList(), and setAlwaysAvailableLanguage().

Referenced by normalize(), and validate().

## ◆ validate()

eZSerializedObjectNameList::validate | ( |  | $param = `true` | ) |

Make sure that languages namelist corresponds to languages in the system.

Parameters

  $param. | TRUE - create languages if they don't exist in the system. FALSE - remove names form namelist if corresponding language doesn't exist in the system. array - language map. The name will be removed if its language is not in the map. Ex: array( 'language_locale_1' => 'map_to_language_locale', 'language_locale_2' => 'skip' ); will map name in 'language_locale_1' language to 'map_to_language_locale' and remove name in 'language_locale_2'. 'map_to_language_locale' language will be created If it doesn't exist in the system.

Definition at line 568 of file ezserializedobjectnamelist.php.

References $nameList, ALWAYS_AVAILABLE_STR, eZContentLanguage\fetchByLocale(), nameList(), removeName(), setName(), and updateAlwaysAvailable().

## Member Data Documentation

## ◆ $DefaultLanguage

eZSerializedObjectNameList::$DefaultLanguage

Definition at line 624 of file ezserializedobjectnamelist.php.

Referenced by defaultLanguage().

## ◆ $HasDirtyData

eZSerializedObjectNameList::$HasDirtyData

Definition at line 623 of file ezserializedobjectnamelist.php.

Referenced by hasDirtyData().

## ◆ $nameList

eZSerializedObjectNameList::$nameList

Definition at line 13 of file ezserializedobjectnamelist.php.

Referenced by cleanNameList(), nameFromSerializedString(), normalize(), and validate().

## ◆ $NameList

eZSerializedObjectNameList::$NameList

Definition at line 622 of file ezserializedobjectnamelist.php.

Referenced by nameList().

## ◆ ALWAYS_AVAILABLE_STR

const eZSerializedObjectNameList::ALWAYS_AVAILABLE_STR = 'always-available'

Definition at line 14 of file ezserializedobjectnamelist.php.

Referenced by alwaysAvailableLanguage(), alwaysAvailableLanguageLocale(), alwaysAvailableName(), appendGroupName(), cleanNameList(), initFromString(), languageLocaleList(), languageMask(), setAlwaysAvailableLanguage(), and validate().

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

- ezserializedobjectnamelist.php

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