drupal_get_region_content
function drupal_get_region_content
drupal_get_region_content($region = NULL, $delimiter = ' ')
Gets assigned content for a given region.
Parameters
$region: A specified region to fetch content for. If NULL, all regions will be returned.
$delimiter: Content to be inserted between imploded array elements.
File
- includes/common.inc, line 193
- Common functions that many Drupal modules will need to reference.
Code
function drupal_get_region_content($region = NULL, $delimiter = ' ') { $content = drupal_add_region_content(); if (isset($region)) { if (isset($content[$region]) && is_array($content[$region])) { return implode($delimiter, $content[$region]); } } else { foreach (array_keys($content) as $region) { if (is_array($content[$region])) { $content[$region] = implode($delimiter, $content[$region]); } } return $content; } }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/includes!common.inc/function/drupal_get_region_content/7.x