You are here

public function Full::buildOptionsForm in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/views/src/Plugin/views/pager/Full.php \Drupal\views\Plugin\views\pager\Full::buildOptionsForm()

Provide the default form for setting options.

Overrides SqlBase::buildOptionsForm

File

core/modules/views/src/Plugin/views/pager/Full.php, line 41

Class

Full
The plugin to handle full pager.

Namespace

Drupal\views\Plugin\views\pager

Code

public function buildOptionsForm(&$form, FormStateInterface $form_state) {
  parent::buildOptionsForm($form, $form_state);
  $form['quantity'] = [
    '#type' => 'number',
    '#min' => 0,
    '#title' => $this
      ->t('Number of pager links visible'),
    '#description' => $this
      ->t('Specify the number of links to pages to display in the pager.'),
    '#default_value' => $this->options['quantity'],
  ];
  $form['tags']['first'] = [
    '#type' => 'textfield',
    '#title' => $this
      ->t('First page link text'),
    '#default_value' => $this->options['tags']['first'],
    '#weight' => -10,
  ];
  $form['tags']['last'] = [
    '#type' => 'textfield',
    '#title' => $this
      ->t('Last page link text'),
    '#default_value' => $this->options['tags']['last'],
    '#weight' => 10,
  ];
}