You are here

public function AutocompletionCallback::optionsSummary in Search Autocomplete 8

Same name and namespace in other branches
  1. 2.x src/Plugin/views/display/AutocompletionCallback.php \Drupal\search_autocomplete\Plugin\views\display\AutocompletionCallback::optionsSummary()

Provides the default summary for options in the views UI.

This output is returned as an array.

Overrides PathPluginBase::optionsSummary

File

src/Plugin/views/display/AutocompletionCallback.php, line 181

Class

AutocompletionCallback
The plugin that handles Data response callbacks for REST resources.

Namespace

Drupal\search_autocomplete\Plugin\views\display

Code

public function optionsSummary(&$categories, &$options) {
  parent::optionsSummary($categories, $options);
  unset($categories['page'], $categories['exposed']);

  // Hide some settings, as they aren't useful for pure data output.
  unset($options['show_admin_links'], $options['analyze-theme']);
  $categories['path'] = [
    'title' => $this
      ->t('Path settings'),
    'column' => 'second',
    'build' => [
      '#weight' => -10,
    ],
  ];
  $options['path']['category'] = 'path';
  $options['path']['title'] = $this
    ->t('Path');

  // Remove css/exposed form settings, as they are not used for the data
  // display.
  unset($options['exposed_form']);
  unset($options['exposed_block']);
  unset($options['css_class']);
}