You are here

public function Link::buildOptionsForm in Views (for Drupal 7) 8.3

Same name in this branch
  1. 8.3 lib/Views/node/Plugin/views/field/Link.php \Views\node\Plugin\views\field\Link::buildOptionsForm()
  2. 8.3 lib/Views/user/Plugin/views/field/Link.php \Views\user\Plugin\views\field\Link::buildOptionsForm()
  3. 8.3 lib/Views/comment/Plugin/views/field/Link.php \Views\comment\Plugin\views\field\Link::buildOptionsForm()

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

Overrides FieldPluginBase::buildOptionsForm

1 call to Link::buildOptionsForm()
LinkEdit::buildOptionsForm in lib/Views/comment/Plugin/views/field/LinkEdit.php
Default options form that provides the label widget that all fields should have.
1 method overrides Link::buildOptionsForm()
LinkEdit::buildOptionsForm in lib/Views/comment/Plugin/views/field/LinkEdit.php
Default options form that provides the label widget that all fields should have.

File

lib/Views/comment/Plugin/views/field/Link.php, line 32
Definition of Views\comment\Plugin\views\field\Link.

Class

Link
Base field handler to present a link.

Namespace

Views\comment\Plugin\views\field

Code

public function buildOptionsForm(&$form, &$form_state) {
  $form['text'] = array(
    '#type' => 'textfield',
    '#title' => t('Text to display'),
    '#default_value' => $this->options['text'],
  );
  $form['link_to_node'] = array(
    '#title' => t('Link field to the node if there is no comment.'),
    '#type' => 'checkbox',
    '#default_value' => $this->options['link_to_node'],
  );
  parent::buildOptionsForm($form, $form_state);
}