You are here

function views_handler_field_block::render in Views block area 7

Render the area

Overrides views_handler_field::render

File

views/handlers/views_handler_field_block.inc, line 73
Block area handlers. Insert a block inside of an area.

Class

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

Code

function render($values) {
  if (!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 '';
}