You are here

public function DisplayTest::optionsSummary in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/views/tests/modules/views_test_data/src/Plugin/views/display/DisplayTest.php \Drupal\views_test_data\Plugin\views\display\DisplayTest::optionsSummary()

Provides the default summary for options in the views UI.

This output is returned as an array.

Overrides DisplayPluginBase::optionsSummary

File

core/modules/views/tests/modules/views_test_data/src/Plugin/views/display/DisplayTest.php, line 55
Contains \Drupal\views_test_data\Plugin\views\display\DisplayTest.

Class

DisplayTest
Defines a Display test plugin.

Namespace

Drupal\views_test_data\Plugin\views\display

Code

public function optionsSummary(&$categories, &$options) {
  parent::optionsSummary($categories, $options);
  $categories['display_test'] = array(
    'title' => $this
      ->t('Display test settings'),
    'column' => 'second',
    'build' => array(
      '#weight' => -100,
    ),
  );
  $test_option = $this
    ->getOption('test_option') ?: $this
    ->t('Empty');
  $options['test_option'] = array(
    'category' => 'display_test',
    'title' => $this
      ->t('Test option'),
    'value' => views_ui_truncate($test_option, 24),
  );
}