_overlay_region_list

Versions
mediamosa-21
_overlay_region_list($type)

Helper function for returning a list of page regions related to the overlay.

See also

overlay_regions()

@see overlay_supplemental_regions()

Parameters

$type The type of regions to return. This can either be 'overlay_regions' or 'overlay_supplemental_regions'.

Return value

An array of region names of the given type, within the theme that is being used to display the current page.

▾ 2 functions call _overlay_region_list()

overlay_regions in modules/overlay/overlay.module
Returns a list of page regions that appear in the overlay.
overlay_supplemental_regions in modules/overlay/overlay.module
Returns a list of supplemental page regions for the overlay.

Code

modules/overlay/overlay.module, line 611

<?php
function _overlay_region_list($type) {
  // Obtain the current theme. We need to first make sure the theme system is
  // initialized, since this function can be called early in the page request.
  drupal_theme_initialize();
  $themes = list_themes();
  $theme = $themes[$GLOBALS['theme']];
  // Return the list of regions stored within the theme's info array, or an
  // empty array if no regions of the appropriate type are defined.
  return !empty($theme->info[$type]) ? $theme->info[$type] : array();
}
?>