You are here

function views_plugin_display_block::execute_hook_block in Views (for Drupal 7) 6.3

Same name and namespace in other branches
  1. 6.2 plugins/views_plugin_display_block.inc \views_plugin_display_block::execute_hook_block()

The default block handler doesn't support configurable items, but extended block handlers might be able to do interesting stuff with it.

File

plugins/views_plugin_display_block.inc, line 27
Contains the block display plugin.

Class

views_plugin_display_block
The plugin that handles a block.

Code

function execute_hook_block($op = 'list', $delta = 0, $edit = array()) {
  if ($op == 'list') {
    $delta = $this->view->name . '-' . $this->display->id;
    $desc = $this
      ->get_option('block_description');
    if (empty($desc)) {
      if ($this->display->display_title == $this->definition['title']) {
        $desc = t('View: @view', array(
          '@view' => $this->view
            ->get_human_name(),
        ));
      }
      else {
        $desc = t('View: @view: @display', array(
          '@view' => $this->view
            ->get_human_name(),
          '@display' => $this->display->display_title,
        ));
      }
    }
    return array(
      $delta => array(
        'info' => $desc,
        'cache' => $this
          ->get_cache_type(),
      ),
    );
  }
}