function DisplayTest::optionsSummary

Same name in other branches
  1. 9 core/modules/views/tests/modules/views_test_data/src/Plugin/views/display/DisplayTest.php \Drupal\views_test_data\Plugin\views\display\DisplayTest::optionsSummary()
  2. 8.9.x core/modules/views/tests/modules/views_test_data/src/Plugin/views/display/DisplayTest.php \Drupal\views_test_data\Plugin\views\display\DisplayTest::optionsSummary()
  3. 11.x core/modules/views/tests/modules/views_test_data/src/Plugin/views/display/DisplayTest.php \Drupal\views_test_data\Plugin\views\display\DisplayTest::optionsSummary()

Overrides DisplayPluginBase::optionsSummary

File

core/modules/views/tests/modules/views_test_data/src/Plugin/views/display/DisplayTest.php, line 52

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'] = [
        'title' => $this->t('Display test settings'),
        'column' => 'second',
        'build' => [
            '#weight' => -100,
        ],
    ];
    $test_option = $this->getOption('test_option') ?: $this->t('Empty');
    $options['test_option'] = [
        'category' => 'display_test',
        'title' => $this->t('Test option'),
        'value' => Unicode::truncate($test_option, 24, FALSE, TRUE),
    ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.