You are here

public function RestExport::optionsSummary in Zircon Profile 8

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

Provides the default summary for options in the views UI.

This output is returned as an array.

Overrides PathPluginBase::optionsSummary

File

core/modules/rest/src/Plugin/views/display/RestExport.php, line 230
Contains \Drupal\rest\Plugin\views\display\RestExport.

Class

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

Namespace

Drupal\rest\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'] = array(
    'title' => $this
      ->t('Path settings'),
    'column' => 'second',
    'build' => array(
      '#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']);
}