Full ELMS Learning Network documentation
function system_region_list
cis7 system.module | system_region_list($theme_key, $show = REGIONS_ALL) |
cle7 system.module | system_region_list($theme_key, $show = REGIONS_ALL) |
elmsmedia7 system.module | system_region_list($theme_key, $show = REGIONS_ALL) |
icor7 system.module | system_region_list($theme_key, $show = REGIONS_ALL) |
meedjum_blog7 system.module | system_region_list($theme_key, $show = REGIONS_ALL) |
mooc7 system.module | system_region_list($theme_key, $show = REGIONS_ALL) |
Get a list of available regions from a specified theme.
Parameters
$theme_key: The name of a theme.
$show: Possible values: REGIONS_ALL or REGIONS_VISIBLE. Visible excludes hidden regions.
Return value
An array of regions in the form $region['name'] = 'description'.
15 calls to system_region_list()
- adaptivetheme_page_alter in sites/
all/ themes/ ulmus/ adaptivetheme/ at_core/ inc/ alter.inc - hook_page_alter()
- alpha_theme_container::regions in sites/
all/ themes/ ulmus/ omega/ alpha/ includes/ base.inc - @todo
- block_admin_configure in modules/
block/ block.admin.inc - Form constructor for the block configuration form.
- block_admin_display_form in modules/
block/ block.admin.inc - Form constructor for the main block administration form.
- block_page_build in modules/
block/ block.module - Implements hook_page_build().
File
- modules/
system/ system.module, line 2689 - Configuration system that lets administrators modify the workings of the site.
Code
function system_region_list($theme_key, $show = REGIONS_ALL) {
$themes = list_themes();
if (!isset($themes[$theme_key])) {
return array();
}
$list = array();
$info = $themes[$theme_key]->info;
// If requested, suppress hidden regions. See block_admin_display_form().
foreach ($info['regions'] as $name => $label) {
if ($show == REGIONS_ALL || !isset($info['regions_hidden']) || !in_array($name, $info['regions_hidden'])) {
$list[$name] = t($label);
}
}
return $list;
}