drupal_set_content

Versions
4.7
drupal_set_content($region = null, $data = null)
5 – 6
drupal_set_content($region = NULL, $data = NULL)

Set content for a specified region.

Parameters

$region Page region the content is assigned to.

$data Content to be set.

▾ 4 functions call drupal_set_content()

drupal_get_content in includes/common.inc
Get assigned content.
install_task_list in ./install.php
Add the installation task list to the current page.
template_preprocess_block_admin_display_form in modules/block/block.admin.inc
Process variables for block-admin-display.tpl.php.
update_task_list in ./update.php
Add the update task list to the current page.

Code

includes/common.inc, line 41

<?php
function drupal_set_content($region = NULL, $data = NULL) {
  static $content = array();

  if (!is_null($region) && !is_null($data)) {
    $content[$region][] = $data;
  }
  return $content;
}
?>
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.