You are here

public function Block::executeHookBlockList in Views (for Drupal 7) 8.3

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

File

lib/Views/block/Plugin/views/display/Block.php, line 54
Definition of Drupal\views\Plugin\views\display\Block. Definition of Views\block\Plugin\views\display\Block.

Class

Block
The plugin that handles a block.

Namespace

Views\block\Plugin\views\display

Code

public function executeHookBlockList($delta = 0, $edit = array()) {
  $delta = $this->view->storage->name . '-' . $this->display['id'];
  $desc = $this
    ->getOption('block_description');
  if (empty($desc)) {
    if ($this->display['display_title'] == $this->definition['title']) {
      $desc = t('View: !view', array(
        '!view' => $this->view->storage
          ->getHumanName(),
      ));
    }
    else {
      $desc = t('View: !view: !display', array(
        '!view' => $this->view->storage
          ->getHumanName(),
        '!display' => $this->display['display_title'],
      ));
    }
  }
  return array(
    $delta => array(
      'info' => $desc,
      'cache' => $this
        ->getCacheType(),
    ),
  );
}