1 block_legacy.class.inc protected BlockLegacy::buildBlock()

Build a block using the legacy hook_block_view().

File

core/modules/layout/includes/block_legacy.class.inc, line 17
Class that wraps around legacy hook_block_view/config/save() hooks.

Class

BlockLegacy
@file Class that wraps around legacy hook_block_view/config/save() hooks.

Code

protected function buildBlock() {
  if (!isset($this->content)) {
    // Simply contexts down to their raw data.
    $context_data = array();
    foreach ($this->contexts as $context_name => $context) {
      $context_data[$context_name] = $context->data;
    }
    $this->content = module_invoke($this->module, 'block_view', $this->delta, $this->settings['block_settings'], $context_data);
  }
  return $this->content;
}