|
eZ Publish
[trunk]
|
Inheritance diagram for eZContentLanguage:
Collaboration diagram for eZContentLanguage:Public Member Functions | |
| classCount () | |
| eZContentLanguage ($row=array()) | |
| Constructor. | |
| localeObject () | |
| objectCount () | |
| objectInitialCount () | |
| removeThis () | |
| Removes the language if there is no object having translation in it. | |
| translation () | |
| updateObjectNames () | |
Static Public Member Functions | |
| static | addLanguage ($locale, $name=null) |
| Adds new language to the site. | |
| static | clearCronjobMode () |
| Switches off the cronjob mode. | |
| static | clearPrioritizedLanguages () |
| Clears the prioritized language list set by eZContentLanguage::setPrioritizedLanguages and reloading the list from INI settings. | |
| static | decodeLanguageMask ($langMask, $returnLanguageLocale=false) |
| Decodes $langMask into all languages it comprises and whether or not the language mask signifies always available or not. | |
| static | definition () |
| Persistent object's definition. | |
| static | expireCache () |
| Removes all memory cache forcing it to read from database again for next method calls. | |
| static | fetch ($id) |
| Fetches the language identified by ID. | |
| static | fetchByLocale ($locale, $createIfNotExist=false) |
| Fetches the language identified by locale code. | |
| static | fetchLimitationList ($forceReloading=false) |
| Fetches the array with names and IDs of the languages used on the site. | |
| static | fetchList ($forceReloading=false) |
| Fetches the list of the languages used on the site. | |
| static | fetchLocaleList () |
| Fetches the array of locale codes of the languages used on the site. | |
| static | idByLocale ($locale) |
| Returns id of the language specified. | |
| static | jsArrayByMask ($mask) |
| Returns the Javascript array with locale codes and names of the languages which have set the corresponding bit in specified mask. | |
| static | languagesByMask ($mask) |
| Returns array of languages which have set the corresponding bit in the mask. | |
| static | languagesSQLFilter ($languageListTable, $languageListAttributeName= 'language_mask') |
| Returns the SQL where-condition for selecting the rows (objects, object versions) which exist in any of prioritized languages or are always available. | |
| static | maskByLocale ($locales, $setZerothBit=false) |
| Returns bitmap mask for the specified languages. | |
| static | maskForRealLanguages () |
| static | prioritizedLanguageCodes () |
| Returns the array of the locale codes of the prioritized languages (in the correct order). | |
| static | prioritizedLanguages ($languageList=false) |
| Fetches the list of the prioritized languages (in the correct order). | |
| static | prioritizedLanguagesByLocaleList ($languageLocaleList) |
| Returns array of prioritized languages which are listed in $languageLocaleList. | |
| static | prioritizedLanguagesByMask ($mask) |
| Returns array of prioritized languages which have set the corresponding bit in the mask. | |
| static | removeLanguage ($id) |
| Removes the language specified by ID. | |
| static | setCronjobMode ($enable=true) |
| Switches on the cronjob mode. | |
| static | setPrioritizedLanguages ($languages) |
| Overrides the prioritized languages set by INI settings with the specified languages. | |
| static | sqlFilter ($languageTable, $languageListTable=null, $languageAttributeName= 'language_id', $languageListAttributeName= 'language_mask') |
| Returns the SQL where-condition for selecting the rows (with object names, attributes etc.) in the correct language, i. | |
| static | topPriorityLanguage () |
| Returns the most prioritized language. | |
| static | topPriorityLanguageByLocaleList ($languageLocaleList) |
| Returns the most prioritized language from specified by $languageLocaleList list of language locales. | |
| static | topPriorityLanguageByMask ($mask) |
| Returns the most prioritized language which has set the corresponding bit in the mask. | |
Public Attributes | |
| const | MAX_COUNT = 30 |
Definition at line 11 of file ezcontentlanguage.php.
| static eZContentLanguage::addLanguage | ( | $ | locale, |
| $ | name = null |
||
| ) | [static] |
Adds new language to the site.
| locale | Locale code (e.g. 'slk-SK') of language to add. |
| name | Optional. Name of the language. If not specified, the international language name for the $locale locale will be used. |
Definition at line 64 of file ezcontentlanguage.php.
Referenced by fetchByLocale(), eZStepCreateSites\initializePackage(), eZContentObjectVersion\unserialize(), and eZContentObject\unserialize().
Definition at line 812 of file ezcontentlanguage.php.
Referenced by removeThis().
| static eZContentLanguage::clearCronjobMode | ( | ) | [static] |
Switches off the cronjob mode.
Definition at line 879 of file ezcontentlanguage.php.
| static eZContentLanguage::clearPrioritizedLanguages | ( | ) | [static] |
Clears the prioritized language list set by eZContentLanguage::setPrioritizedLanguages and reloading the list from INI settings.
Definition at line 405 of file ezcontentlanguage.php.
Referenced by eZURLAliasML\getPath(), eZContentObjectTreeNode\subTreeByNodeID(), eZContentObjectTreeNode\subTreeCountByNodeID(), and eZContentObjectTreeNode\subTreeMultiPaths().
| static eZContentLanguage::decodeLanguageMask | ( | $ | langMask, |
| $ | returnLanguageLocale = false |
||
| ) | [static] |
Decodes $langMask into all languages it comprises and whether or not the language mask signifies always available or not.
The constituent languages are returned as an array of language ids. If the second parameter, $returnLanguageLocale is set to TRUE, locale-codes are used instead of language ids.
| int | $langMask | |
| boolean | $returnLanguageLocale |
Definition at line 600 of file ezcontentlanguage.php.
Referenced by eZXMLTextType\onPublish().
| static eZContentLanguage::definition | ( | ) | [static] |
Persistent object's definition.
Reimplemented from eZPersistentObject.
Definition at line 28 of file ezcontentlanguage.php.
Referenced by fetchList().
| static eZContentLanguage::expireCache | ( | ) | [static] |
Removes all memory cache forcing it to read from database again for next method calls.
Definition at line 928 of file ezcontentlanguage.php.
Referenced by eZStepCreateSites\initializePackage().
| eZContentLanguage::eZContentLanguage | ( | $ | row = array() | ) |
Constructor.
| row | Parameter passed to the constructor of eZPersistentObject. |
Definition at line 20 of file ezcontentlanguage.php.
Referenced by addLanguage().
| static eZContentLanguage::fetch | ( | $ | id | ) | [static] |
Fetches the language identified by ID.
| id | Identifier of the language to fetch. |
Definition at line 263 of file ezcontentlanguage.php.
Referenced by decodeLanguageMask(), eZContentObjectStateGroup\defaultLanguage(), eZContentObjectState\defaultLanguage(), eZPathElement\getLanguage(), eZContentObjectStateLanguage\language(), eZContentObjectStateGroupLanguage\language(), removeLanguage(), eZContentFunctions\updateAndPublishObject(), and eZContentOperationCollection\updateInitialLanguage().
| static eZContentLanguage::fetchByLocale | ( | $ | locale, |
| $ | createIfNotExist = false |
||
| ) | [static] |
Fetches the language identified by locale code.
| locale | Locale of the language to fetch, e. g. 'slk-SK'. |
Definition at line 276 of file ezcontentlanguage.php.
Referenced by addLanguage(), eZSerializedObjectNameList\alwaysAvailableLanguage(), eZContentObject\currentLanguageObject(), eZContentObject\defaultLanguage(), eZURLAliasML\fetchPathByActionList(), idByLocale(), eZStepCreateSites\initializePackage(), eZPackage\languageInfo(), eZSerializedObjectNameList\languages(), maskByLocale(), prioritizedLanguages(), eZURLAliasML\removeSingleEntry(), eZContentObjectStateGroup\setCurrentLanguage(), eZContentObjectState\setCurrentLanguage(), eZSerializedObjectNameList\setDefaultLanguageByLocale(), eZURLAliasML\storePath(), eZContentObjectVersion\unserialize(), eZContentObject\unserialize(), and eZSerializedObjectNameList\validate().
| static eZContentLanguage::fetchLimitationList | ( | $ | forceReloading = false | ) | [static] |
Fetches the array with names and IDs of the languages used on the site.
This method is used by the permission system.
| forceReloading | Optional. If true, the list will be fetched from database even if it is cached in memory. Default value is false. |
Definition at line 226 of file ezcontentlanguage.php.
| static eZContentLanguage::fetchList | ( | $ | forceReloading = false | ) | [static] |
Fetches the list of the languages used on the site.
| forceReloading | Optional. If true, the list will be fetched from database even if it is cached in memory. Default value is false. |
Definition at line 175 of file ezcontentlanguage.php.
Referenced by addLanguage(), eZContentObjectStateGroup\allTranslations(), eZContentObjectState\allTranslations(), eZMultiplexerType\attribute(), eZApproveType\attribute(), fetch(), fetchByLocale(), fetchLimitationList(), fetchLocaleList(), languagesByMask(), maskForRealLanguages(), prioritizedLanguages(), and removeThis().
| static eZContentLanguage::fetchLocaleList | ( | ) | [static] |
Fetches the array of locale codes of the languages used on the site.
Definition at line 243 of file ezcontentlanguage.php.
Referenced by eZContentObject\canCreateClassList(), eZContentObjectTreeNode\canCreateClassList(), eZContentClass\canInstantiateClassList(), and eZContentObjectPackageHandler\handleParameters().
| static eZContentLanguage::idByLocale | ( | $ | locale | ) | [static] |
Returns id of the language specified.
| locale | String specifying locale code of the language, e. g. 'slk-SK' |
Definition at line 649 of file ezcontentlanguage.php.
Referenced by eZSerializedObjectNameList\alwaysAvailableLanguageID(), eZContentObjectVersion\checkAccess(), eZContentObject\checkAccess(), eZContentObjectTreeNode\checkAccess(), eZContentObjectAttribute\cloneContentObjectAttribute(), eZContentObject\copyVersion(), eZContentObjectAttribute\create(), eZContentObjectVersion\create(), eZContentObject\create(), eZSerializedObjectNameList\languageMask(), eZContentObject\setName(), eZContentClass\setName(), eZContentObjectAttribute\translateTo(), eZContentObjectStateGroup\translationByLocale(), eZContentObjectState\translationByLocale(), and eZContentObject\versions().
| static eZContentLanguage::jsArrayByMask | ( | $ | mask | ) | [static] |
Returns the Javascript array with locale codes and names of the languages which have set the corresponding bit in specified mask.
| mask | Bitmap mask specifying which languages should be considered. |
Definition at line 891 of file ezcontentlanguage.php.
Referenced by eZContentObject\availableLanguagesJsArray(), eZContentStructureTreeOperator\createContentStructureNode(), and eZContentStructureTreeOperator\initContentStructureTree().
| static eZContentLanguage::languagesByMask | ( | $ | mask | ) | [static] |
Returns array of languages which have set the corresponding bit in the mask.
| mask | Bitmap specifying which languages should be returned. |
Definition at line 444 of file ezcontentlanguage.php.
Referenced by eZContentObject\allLanguages(), eZMultiplexerType\attributeDecoder(), eZApproveType\attributeDecoder(), and eZContentOperationCollection\copyTranslations().
| static eZContentLanguage::languagesSQLFilter | ( | $ | languageListTable, |
| $ | languageListAttributeName = 'language_mask' |
||
| ) | [static] |
Returns the SQL where-condition for selecting the rows (objects, object versions) which exist in any of prioritized languages or are always available.
| languageListTable | Name of the table |
| languageListAttributeName | Optional. Name of the attribute in the table which contains the bitmap mask. 'language_mask' by default. |
Definition at line 671 of file ezcontentlanguage.php.
Referenced by eZURLAliasML\fetchByAction(), eZContentObjectStateGroup\fetchByConditions(), eZContentObjectState\fetchByConditions(), eZURLAliasML\fetchByParentID(), eZURLAliasML\fetchByPath(), eZContentObjectTreeNode\fetchNode(), eZURLAliasML\fetchPathByActionList(), eZURLAliasQuery\generateSQL(), eZURLAliasML\getPath(), eZURLAliasML\reverseTranslate(), eZSearchEngine\search(), eZContentObjectTreeNode\subTreeByNodeID(), eZContentObjectTreeNode\subTreeMultiPaths(), eZURLAliasML\translate(), and eZContentObjectTrashNode\trashList().
Definition at line 432 of file ezcontentlanguage.php.
| static eZContentLanguage::maskByLocale | ( | $ | locales, |
| $ | setZerothBit = false |
||
| ) | [static] |
Returns bitmap mask for the specified languages.
| locales | Array of strings or a string specifying locale codes of the languages, e. g. 'slk-SK' or array( 'eng-GB', 'nor-NO' ) |
| setZerothBit | Optional. Specifies if the 0-th bit of mask should be set. False by default. |
Definition at line 558 of file ezcontentlanguage.php.
Referenced by eZContentObjectVersion\checkAccess(), eZContentObject\checkAccess(), eZContentObjectTreeNode\checkAccess(), eZURLAliasML\fetchByAction(), eZContentOperationCollection\setObjectStatusPublished(), and eZContentObjectVersion\updateLanguageMask().
| static eZContentLanguage::maskForRealLanguages | ( | ) | [static] |
Definition at line 914 of file ezcontentlanguage.php.
Referenced by eZContentObject\removeTranslation().
Definition at line 791 of file ezcontentlanguage.php.
Referenced by removeThis().
Definition at line 836 of file ezcontentlanguage.php.
| static eZContentLanguage::prioritizedLanguageCodes | ( | ) | [static] |
Returns the array of the locale codes of the prioritized languages (in the correct order).
Definition at line 373 of file ezcontentlanguage.php.
Referenced by eZContentClass\canInstantiateLanguages(), eZContentFunctionCollection\fetchPrioritizedLanguageCodes(), and ezpLanguageSwitcherFunctionCollection\fetchUrlAlias().
| static eZContentLanguage::prioritizedLanguages | ( | $ | languageList = false | ) | [static] |
Fetches the list of the prioritized languages (in the correct order).
| languageList | Optional. If specified, this array of locale codes with will override the INI settings. Usage of this parameter is restricted to methods of this class! See eZContentLanguage::setPrioritizedLanguages(). |
Definition at line 306 of file ezcontentlanguage.php.
Referenced by eZContentObject\canCreateLanguages(), eZContentObject\canEditLanguages(), eZURLAliasML\fetchPathByActionList(), eZContentFunctionCollection\fetchPrioritizedLanguages(), eZStepCreateSites\initializePackage(), eZURLAliasML\languageScore(), languagesSQLFilter(), prioritizedLanguageCodes(), prioritizedLanguagesByLocaleList(), prioritizedLanguagesByMask(), setPrioritizedLanguages(), sqlFilter(), topPriorityLanguage(), topPriorityLanguageByLocaleList(), topPriorityLanguageByMask(), eZContentObjectVersion\unserialize(), eZContentObject\unserialize(), and eZSerializedObjectNameList\untranslatedLanguages().
| static eZContentLanguage::prioritizedLanguagesByLocaleList | ( | $ | languageLocaleList | ) | [static] |
Returns array of prioritized languages which are listed in $languageLocaleList.
The function does the same as 'prioritizedLanguagesByMask' but uses language locale list instead of language mask.
| languageLocaleList | List of language locales to choose from. |
Definition at line 489 of file ezcontentlanguage.php.
Referenced by eZSerializedObjectNameList\prioritizedLanguages().
| static eZContentLanguage::prioritizedLanguagesByMask | ( | $ | mask | ) | [static] |
Returns array of prioritized languages which have set the corresponding bit in the mask.
| mask | Bitmap specifying which languages should be returned. |
Definition at line 466 of file ezcontentlanguage.php.
Referenced by jsArrayByMask(), eZContentObjectStateGroup\languages(), eZContentObjectState\languages(), and eZContentObject\languages().
| static eZContentLanguage::removeLanguage | ( | $ | id | ) | [static] |
Removes the language specified by ID.
| id | ID of the language to be removed. |
Definition at line 133 of file ezcontentlanguage.php.
Removes the language if there is no object having translation in it.
Definition at line 151 of file ezcontentlanguage.php.
| static eZContentLanguage::setCronjobMode | ( | $ | enable = true | ) | [static] |
Switches on the cronjob mode.
In this mode, the languages which are not in the list of the prioritized languages will be automatically added to it.
| enable | Optional. If false, it will switch off the cronjob mode. True by default. |
Definition at line 868 of file ezcontentlanguage.php.
Referenced by clearCronjobMode().
| static eZContentLanguage::setPrioritizedLanguages | ( | $ | languages | ) | [static] |
Overrides the prioritized languages set by INI settings with the specified languages.
| languages | Locale codes of the languages which will override the prioritized languages (the order is relevant). |
Definition at line 393 of file ezcontentlanguage.php.
Referenced by clearPrioritizedLanguages(), eZURLAliasML\getPath(), eZStepCreateSites\initializePackage(), eZContentObjectTreeNode\subTreeByNodeID(), eZContentObjectTreeNode\subTreeCountByNodeID(), and eZContentObjectTreeNode\subTreeMultiPaths().
| static eZContentLanguage::sqlFilter | ( | $ | languageTable, |
| $ | languageListTable = null, |
||
| $ | languageAttributeName = 'language_id', |
||
| $ | languageListAttributeName = 'language_mask' |
||
| ) | [static] |
Returns the SQL where-condition for selecting the rows (with object names, attributes etc.) in the correct language, i.
e. in the most prioritized language from those in which an object exists.
| languageTable | Name of the table containing the attribute with the language id. |
| languageListTable | Name of the table containing the attribute with the available languages bitmap. |
| languageAttributeName | Optional. Name of the attribute in $languageTable which contains the language id. 'language_id' by default. |
| languageListAttributeName | Optional. Name of the attribute in $languageListTable which contains the bitmap mask. 'language_mask' by default. |
Definition at line 703 of file ezcontentlanguage.php.
Referenced by eZContentObjectTreeNode\createAttributeFilterSQLStrings(), eZContentObjectTreeNode\createSortingSQLStrings(), eZContentObjectTreeNode\createVersionNameJoinsSQLString(), eZContentObjectTreeNode\fetch(), eZContentObjectVersion\fetchAttributes(), eZContentObject\fetchAttributesByIdentifier(), eZContentObjectStateGroup\fetchByConditions(), eZContentObjectState\fetchByConditions(), eZContentObject\fetchByNodeID(), eZContentObject\fetchIDArray(), eZContentObject\relatedObjects(), eZSearchEngine\search(), eZContentClassName\sqlAppendFilter(), and eZContentClassName\sqlFilter().
| static eZContentLanguage::topPriorityLanguage | ( | ) | [static] |
Returns the most prioritized language.
Definition at line 416 of file ezcontentlanguage.php.
Referenced by decodeLanguageMask(), eZContentObject\defaultLanguage(), and eZURLAliasML\storePath().
| static eZContentLanguage::topPriorityLanguageByLocaleList | ( | $ | languageLocaleList | ) | [static] |
Returns the most prioritized language from specified by $languageLocaleList list of language locales.
The function does the same as 'topPriorityLanguageByMask' but uses language locale list instead of language mask.
| languageLocaleList | List of language locales to choose from. |
Definition at line 534 of file ezcontentlanguage.php.
Referenced by eZSerializedObjectNameList\topPriorityLanguage().
| static eZContentLanguage::topPriorityLanguageByMask | ( | $ | mask | ) | [static] |
Returns the most prioritized language which has set the corresponding bit in the mask.
| mask | Bitmap specifying which languages should be checked. |
Definition at line 514 of file ezcontentlanguage.php.
Referenced by eZContentObject\eZContentObject().
Definition at line 850 of file ezcontentlanguage.php.
Definition at line 858 of file ezcontentlanguage.php.
| const eZContentLanguage::MAX_COUNT = 30 |
Definition at line 13 of file ezcontentlanguage.php.
Referenced by addLanguage(), and decodeLanguageMask().