public function Block::optionsSummary

Provide the summary for page options in the views UI.

This output is returned as an array.

Overrides DisplayPluginBase::optionsSummary

File

drupal/core/modules/block/lib/Drupal/block/Plugin/views/display/Block.php, line 93
Definition of Drupal\views\Plugin\views\display\Block. Definition of Drupal\block\Plugin\views\display\Block.

Class

Block
The plugin that handles a block.

Namespace

Drupal\block\Plugin\views\display

Code

public function optionsSummary(&$categories, &$options) {
  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()],
  );
}