public function DisplayPluginBase::optionLink

Because forms may be split up into sections, this provides an easy URL to exactly the right section. Don't override this.

1 call to DisplayPluginBase::optionLink()
DisplayPluginBase::buildOptionsForm in drupal/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php
Provide the default form for setting options.

File

drupal/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php, line 945
Contains Drupal\views\Plugin\views\display\DisplayPluginBase.

Class

DisplayPluginBase
The default display plugin handler. Display plugins handle options and basic mechanisms for different output methods.

Namespace

Drupal\views\Plugin\views\display

Code

public function optionLink($text, $section, $class = '', $title = '') {
  if (!empty($class)) {
    $text = '<span>' . $text . '</span>';
  }
  if (!trim($text)) {
    $text = t('Broken field');
  }
  if (empty($title)) {
    $title = $text;
  }
  return l($text, 'admin/structure/views/nojs/display/' . $this->view->storage
    ->get('name') . '/' . $this->display['id'] . '/' . $section, array(
    'attributes' => array(
      'class' => 'views-ajax-link ' . $class,
      'title' => $title,
      'id' => drupal_html_id('views-' . $this->display['id'] . '-' . $section),
    ),
    'html' => TRUE,
  ));
}