system_region_list

  1. drupal
    1. drupal6
    2. drupal7
Versionen
drupal6 – drupal7 system_region_list($theme_key)

Get a list of available regions from a specified theme.

Übergabeparameter

$theme_key The name of a theme.

Rückgabewert

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 1010

<?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];
}
?>

Kommentare

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen