You are here

function views_handler_area_block::render in Views block area 7

Render the area

Overrides views_handler_area::render

File

views/handlers/views_handler_area_block.inc, line 58
Block area handlers. Insert a block inside of an area.

Class

views_handler_area_block
@file Block area handlers. Insert a block inside of an area.

Code

function render($empty = FALSE) {
  if ((!$empty || !empty($this->options['empty'])) && !empty($this->options['block_to_insert'])) {
    list($module, $delta) = explode(':', $this->options['block_to_insert'], 2);
    $block = block_load($module, $delta);
    if (empty($block)) {
      return;
    }
    if (!empty($this->options['title'])) {
      $block->title = $this->options['title'];
    }
    $block_content = _block_render_blocks(array(
      $block,
    ));
    $build = _block_get_renderable_array($block_content);
    return drupal_render($build);
  }
  return '';
}