You are here

public function Path::buildOptionsForm in Drupal 8

Default options form that provides the label widget that all fields should have.

Overrides FieldPluginBase::buildOptionsForm

File

core/modules/node/src/Plugin/views/field/Path.php, line 48

Class

Path
Field handler to present the path to the node.

Namespace

Drupal\node\Plugin\views\field

Code

public function buildOptionsForm(&$form, FormStateInterface $form_state) {
  parent::buildOptionsForm($form, $form_state);
  $form['absolute'] = [
    '#type' => 'checkbox',
    '#title' => $this
      ->t('Use absolute link (begins with "http://")'),
    '#default_value' => $this->options['absolute'],
    '#description' => $this
      ->t('Enable this option to output an absolute link. Required if you want to use the path as a link destination (as in "output this field as a link" above).'),
    '#fieldset' => 'alter',
  ];
}