function language_hierarchy_get_root_languages in Language Hierarchy 7
Returns top level languages.
Return value
array List of top level languages, keyed with language code
2 calls to language_hierarchy_get_root_languages()
- language_hierarchy_attach_language_selector in ./
language_hierarchy.module - Attach libraries to replace local tasks links with hierarchical links.
- language_hierarchy_language_list in ./
language_hierarchy.module - Returns flat list of languages with additional depth information, ordered in manner that is then usable by tablesort
2 string references to 'language_hierarchy_get_root_languages'
- language_hierarchy_form_submit in ./
language_hierarchy_form.inc - Submit callback for the language_hierarchy_form form.
- language_hierarchy_language_add_form_submit_callback in ./
language_hierarchy.module - An additional submission callback for the add predefined language form.
File
- ./
language_hierarchy.module, line 354
Code
function language_hierarchy_get_root_languages() {
$top_level_languages =& drupal_static(__FUNCTION__);
if (!isset($top_level_languages)) {
$top_level_languages = db_select('languages', 'l')
->fields('l')
->condition('parent', '')
->orderBy('weight', 'ASC')
->orderBy('name', 'ASC')
->execute()
->fetchAllAssoc('language');
}
return $top_level_languages;
}