You are here

public function PathPluginBase::optionsSummary in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/views/src/Plugin/views/display/PathPluginBase.php \Drupal\views\Plugin\views\display\PathPluginBase::optionsSummary()

Provides the default summary for options in the views UI.

This output is returned as an array.

Overrides DisplayPluginBase::optionsSummary

3 calls to PathPluginBase::optionsSummary()
Feed::optionsSummary in core/modules/views/src/Plugin/views/display/Feed.php
Provides the default summary for options in the views UI.
Page::optionsSummary in core/modules/views/src/Plugin/views/display/Page.php
Provides the default summary for options in the views UI.
RestExport::optionsSummary in core/modules/rest/src/Plugin/views/display/RestExport.php
Provides the default summary for options in the views UI.
3 methods override PathPluginBase::optionsSummary()
Feed::optionsSummary in core/modules/views/src/Plugin/views/display/Feed.php
Provides the default summary for options in the views UI.
Page::optionsSummary in core/modules/views/src/Plugin/views/display/Page.php
Provides the default summary for options in the views UI.
RestExport::optionsSummary in core/modules/rest/src/Plugin/views/display/RestExport.php
Provides the default summary for options in the views UI.

File

core/modules/views/src/Plugin/views/display/PathPluginBase.php, line 404

Class

PathPluginBase
The base display plugin for path/callbacks. This is used for pages and feeds.

Namespace

Drupal\views\Plugin\views\display

Code

public function optionsSummary(&$categories, &$options) {
  parent::optionsSummary($categories, $options);
  $categories['page'] = [
    'title' => $this
      ->t('Page settings'),
    'column' => 'second',
    'build' => [
      '#weight' => -10,
    ],
  ];
  $path = strip_tags($this
    ->getOption('path'));
  if (empty($path)) {
    $path = $this
      ->t('No path is set');
  }
  else {
    $path = '/' . $path;
  }
  $options['path'] = [
    'category' => 'page',
    'title' => $this
      ->t('Path'),
    'value' => views_ui_truncate($path, 24),
  ];
}