function PathPluginBase::optionsSummary

Same name and namespace in other branches
  1. 9 core/modules/views/src/Plugin/views/display/PathPluginBase.php \Drupal\views\Plugin\views\display\PathPluginBase::optionsSummary()
  2. 10 core/modules/views/src/Plugin/views/display/PathPluginBase.php \Drupal\views\Plugin\views\display\PathPluginBase::optionsSummary()
  3. 11.x core/modules/views/src/Plugin/views/display/PathPluginBase.php \Drupal\views\Plugin\views\display\PathPluginBase::optionsSummary()

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),
    ];
}

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