system_region_list

Versions
4.7 – 6
system_region_list($theme_key)
7
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.

Return value

An array of regions in the form $region['name'] = 'description'.

▾ 7 functions call system_region_list()

block_admin_display_form in modules/block/block.admin.inc
Generate main blocks administration form.
system_default_region in modules/system/system.module
Get the name of the default region for a given theme.
system_initialize_theme_blocks in modules/system/system.module
Assign an initial, default set of blocks for a theme.
template_preprocess_block_admin_display_form in modules/block/block.admin.inc
Process variables for block-admin-display.tpl.php.
template_preprocess_page in includes/theme.inc
Process variables for page.tpl.php
_block_compare in modules/block/block.admin.inc
Helper function for sorting blocks on admin/build/block.
_block_rehash in modules/block/block.module
Update the 'blocks' DB table with the blocks currently exported by modules.

Code

modules/system/system.module, line 1009

<?php
function system_region_list($theme_key) {
  static $list = array();

  if (!array_key_exists($theme_key, $list)) {
    $info = unserialize(db_result(db_query("SELECT info FROM {system} WHERE type = 'theme' AND name = '%s'", $theme_key)));
    $list[$theme_key] = array_map('t', $info['regions']);
  }

  return $list[$theme_key];
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.