_block_get_renderable_array

Versions
mediamosa-21
_block_get_renderable_array($list = array())

Get an array of blocks suitable for drupal_render().

Parameters

$list A list of blocks such as that returned by block_list().

Return value

A renderable array.

▾ 3 functions call _block_get_renderable_array()

block_get_blocks_by_region in modules/block/block.module
Get a renderable array of a region containing all enabled blocks.
dashboard_page_build in modules/dashboard/dashboard.module
Implements hook_page_build().
dashboard_show_block_content in modules/dashboard/dashboard.module
AJAX callback to display the rendered contents of a specific block.

Code

modules/block/block.module, line 283

<?php
function _block_get_renderable_array($list = array()) {
  $weight = 0;
  $build = array();
  foreach ($list as $key => $block) {
    $build[$key] = $block->content;
    unset($block->content);

    // Add contextual links for this block; skipping the system main block.
    if ($key != 'system_main') {
      $build[$key]['#contextual_links']['block'] = array('admin/structure/block/manage', array($block->module, $block->delta));
    }

    $build[$key] += array(
      '#block' => $block,
      '#weight' => ++$weight,
    );
    $build[$key]['#theme_wrappers'][] ='block';
  }
  $build['#sorted'] = TRUE;
  return $build;
}
?>