public function Links::buildOptionsForm

Overrides \Drupal\views\Plugin\views\field\FieldPluginBase::defineOptions().

Overrides FieldPluginBase::buildOptionsForm

File

drupal/core/modules/views/lib/Drupal/views/Plugin/views/field/Links.php, line 32
Contains \Drupal\views\Plugin\views\field\Links.

Class

Links
A abstract handler which provides a collection of links.

Namespace

Drupal\views\Plugin\views\field

Code

public function buildOptionsForm(&$form, &$form_state) {
  parent::buildOptionsForm($form, $form_state);

  // Only show fields that precede this one.
  $field_options = $this
    ->getPreviousFieldLabels();
  $form['fields'] = array(
    '#type' => 'checkboxes',
    '#title' => t('Fields'),
    '#description' => t('Fields to be included as links.'),
    '#options' => $field_options,
    '#default_value' => $this->options['fields'],
  );
  $form['destination'] = array(
    '#type' => 'checkbox',
    '#title' => t('Include destination'),
    '#description' => t('Include a "destination" parameter in the link to return the user to the original view upon completing the link action.'),
    '#default_value' => $this->options['destination'],
  );
}