[ Index ] |
|
Code source de eZ Publish 3.9.0 |
[Code source] [Imprimer] [Statistiques]
(pas de description)
Poids: | 857 lignes (29 kb) |
Inclus ou requis: | 31 fois |
Référencé: | 0 fois |
Nécessite: | 3 fichiers kernel/classes/ezcontentcachemanager.php lib/ezlocale/classes/ezlocale.php kernel/classes/ezpersistentobject.php |
eZContentLanguage:: (34 méthodes):
eZContentLanguage()
definition()
addLanguage()
removeLanguage()
remove()
fetchList()
fetchLimitationList()
fetchLocaleList()
fetch()
fetchByLocale()
prioritizedLanguages()
prioritizedLanguageCodes()
setPrioritizedLanguages()
clearPrioritizedLanguages()
topPriorityLanguage()
localeObject()
languagesByMask()
prioritizedLanguagesByMask()
prioritizedLanguagesByLocaleList()
topPriorityLanguageByMask()
topPriorityLanguageByLocaleList()
maskByLocale()
idByLocale()
languagesSQLFilter()
sqlFilter()
objectCount()
objectInitialCount()
translation()
updateObjectNames()
setCronjobMode()
clearCronjobMode()
jsArrayByMask()
maskForRealLanguages()
expireCache()
Classe: eZContentLanguage - X-Ref
eZContentLanguage( $row = array() X-Ref |
Constructor. \param row Parameter passed to the constructor of eZPersistentObject. |
definition() X-Ref |
Persistent object's definition. |
addLanguage( $locale, $name = null ) X-Ref |
Adds new language to the site. \param locale Locale code (e.g. 'slk-SK') of language to add. \param name Optional. Name of the language. If not specified, the international language name for the $locale locale will be used. \return eZContentLanguage object of the added language (or the existing one if specified language has been already used) or false in case of any error (invalid locale code or already reached CONTENT_LANGUAGES_MAX_COUNT languages). \static |
removeLanguage( $id ) X-Ref |
Removes the language specified by ID. \param id ID of the language to be removed. \return True if the language was removed from the site, false otherwise. \static |
remove() X-Ref |
Removes the language if there is no object having translation in it. \return True if the language was removed from the site, false otherwise. |
fetchList( $forceReloading = false ) X-Ref |
Fetches the list of the languages used on the site. \param forceReloading Optional. If true, the list will be fetched from database even if it is cached in memory. Default value is false. \return Array of the eZContentLanguage objects of languages used on the site. \static |
fetchLimitationList( $forceReloading = false ) X-Ref |
Fetches the array with names and IDs of the languages used on the site. This method is used by the permission system. \param forceReloading Optional. If true, the list will be fetched from database even if it is cached in memory. Default value is false. \return Array with names and IDs of the languages used on the site. \static |
fetchLocaleList() X-Ref |
Fetches the array of locale codes of the languages used on the site. \return Array of locale codes of the languages used on the site. \static |
fetch( $id ) X-Ref |
Fetches the language identified by ID. \param id Identifier of the language to fetch. \return eZContentLanguage object of language identified by ID $id. \static |
fetchByLocale( $locale ) X-Ref |
Fetches the language identified by locale code. \param locale Locale of the language to fetch, e. g. 'slk-SK'. \return eZContentLanguage object identified by locale code $locale. |
prioritizedLanguages( $languageList = false ) X-Ref |
Fetches the list of the prioritized languages (in the correct order). \param 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(). \return Array of the eZContentLanguage objects of the prioritized languages. \static |
prioritizedLanguageCodes() X-Ref |
Returns the array of the locale codes of the prioritized languages (in the correct order). \return Array of the locale codes of the prioritized languages (in the correct order). \see eZContentLanguage::prioritizedLanguages() \static |
setPrioritizedLanguages( $languages ) X-Ref |
Overrides the prioritized languages set by INI settings with the specified languages. \param languages Locale codes of the languages which will override the prioritized languages (the order is relevant). \static |
clearPrioritizedLanguages() X-Ref |
Clears the prioritized language list set by eZContentLanguage::setPrioritizedLanguages and reloading the list from INI settings. \static |
topPriorityLanguage() X-Ref |
Returns the most prioritized language. \return eZContentLanguage object for the most prioritized language. \static |
localeObject() X-Ref |
\return Locale object for this language. |
languagesByMask( $mask ) X-Ref |
Returns array of languages which have set the corresponding bit in the mask. \param mask Bitmap specifying which languages should be returned. \return Array of eZContentLanguage objects of languages which have set the corresponding bit in $mask. |
prioritizedLanguagesByMask( $mask ) X-Ref |
Returns array of prioritized languages which have set the corresponding bit in the mask. \param mask Bitmap specifying which languages should be returned. \return Array of eZContentLanguage objects of prioritized languages which have set the corresponding bit in $mask. |
prioritizedLanguagesByLocaleList( $languageLocaleList ) X-Ref |
Returns array of prioritized languages which are listed in \a $languageLocaleList. The function does the same as 'prioritizedLanguagesByMask' but uses language locale list instead of language mask. \param languageLocaleList List of language locales to choose from. \return Array of eZContentLanguage objects of prioritized languages which have set the corresponding bit in $mask. |
topPriorityLanguageByMask( $mask ) X-Ref |
Returns the most prioritized language which has set the corresponding bit in the mask. \param mask Bitmap specifying which languages should be checked. \return eZContentLanguage object of the most prioritized language which have set the corresponding bit in $mask. |
topPriorityLanguageByLocaleList( $languageLocaleList ) X-Ref |
Returns the most prioritized language from specified by \a $languageLocaleList list of language locales. The function does the same as 'topPriorityLanguageByMask' but uses language locale list instead of language mask. \param languageLocaleList List of language locales to choose from. \return eZContentLanguage object of the most prioritized language. |
maskByLocale( $locales, $setZerothBit = false ) X-Ref |
Returns bitmap mask for the specified languages. \param locales Array of strings or a string specifying locale codes of the languages, e. g. 'slk-SK' or array( 'eng-GB', 'nor-NO' ) \param setZerothBit Optional. Specifies if the 0-th bit of mask should be set. False by default. \return Bitmap mask having set the corresponding bits for the specified languages. |
idByLocale( $locale ) X-Ref |
\static Returns id of the language specified. \param locale String specifying locale code of the language, e. g. 'slk-SK' \return ID of the language specified by locale or false if the language is not set on the site. |
languagesSQLFilter( $languageListTable, $languageListAttributeName = 'language_mask' ) X-Ref |
Returns the SQL where-condition for selecting the rows (objects, object versions) which exist in any of prioritized languages or are always available. \param languageListTable Name of the table \param languageListAttributeName Optional. Name of the attribute in the table which contains the bitmap mask. 'language_mask' by default. \return SQL where-condition described above. \static |
sqlFilter( $languageTable, $languageListTable = null, $languageAttributeName = 'language_id', $languageListAttributeName = 'language_mask' ) X-Ref |
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. \param languageTable Name of the table containing the attribute with bitmaps. \param languageListTable Name of the table containing the attribute with language id. \param languageAttributeName Optional. Name of the attribute in $languageTable which contains the language id. 'language_id' by default. \param languageListAttributeName Optional. Name of the attribute in $languageListTable which contains the bitmap mask. 'language_mask' by default. \return SQL where-condition described above. |
objectCount() X-Ref |
\return The count of objects containing the translation in this language. |
objectInitialCount() X-Ref |
\return The count of objects having this language as the initial/main one. |
translation() X-Ref |
\return Reference to itself. Kept because of the backward compatibility. |
updateObjectNames() X-Ref |
\deprecated |
setCronjobMode( $enable = true ) X-Ref |
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. \param enable Optional. If false, it will switch off the cronjob mode. True by default. |
clearCronjobMode() X-Ref |
Switches off the cronjob mode. \see eZContentLanguage::setCronjobMode() |
jsArrayByMask( $mask ) X-Ref |
Returns the Javascript array with locale codes and names of the languages which have set the corresponding bit in specified mask. \param mask Bitmap mask specifying which languages should be considered. \return JavaScript array described above. |
maskForRealLanguages() X-Ref |
\return The bitmap mask containing all languages, i. e. the sum of the IDs of all languages. (The 0-th bit is set.) |
expireCache() X-Ref |
Removes all memory cache forcing it to read from database again for next method calls. \static |
Généré le : Sat Feb 24 10:30:04 2007 | par Balluche grâce à PHPXref 0.7 |