You are here

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

Provide the summary for page options in the views UI.

This output is returned as an array.

Overrides DisplayPluginBase::optionsSummary

File

lib/Views/block/Plugin/views/display/Block.php, line 92
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 optionsSummary(&$categories, &$options) {

  // It is very important to call the parent function here:
  parent::optionsSummary($categories, $options);
  $categories['block'] = array(
    'title' => t('Block settings'),
    'column' => 'second',
    'build' => array(
      '#weight' => -10,
    ),
  );
  $block_description = strip_tags($this
    ->getOption('block_description'));
  if (empty($block_description)) {
    $block_description = t('None');
  }
  $options['block_description'] = array(
    'category' => 'block',
    'title' => t('Block name'),
    'value' => views_ui_truncate($block_description, 24),
  );
  $types = $this
    ->blockCachingModes();
  $options['block_caching'] = array(
    'category' => 'other',
    'title' => t('Block caching'),
    'value' => $types[$this
      ->getCacheType()],
  );
}