You are here

public static function RenderHelper::viewBlock in Helper 7

Render a specific block.

Parameters

string $module: The module machine name.

string $delta: The block delta.

Return value

array The render array of the block output.

File

lib/RenderHelper.php, line 51

Class

RenderHelper

Code

public static function viewBlock($module, $delta) {
  $block = new stdClass();
  $block->module = $module;
  $block->delta = $delta;
  $block->enabled = TRUE;
  $block->page_match = TRUE;
  $blocks = array();
  $blocks[$module . "_" . $delta] = $block;
  $block_content = _block_render_blocks($blocks);
  return _block_get_renderable_array($block_content);
}