public function Link::buildOptionsForm

Same name in this branch

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

Overrides FieldPluginBase::buildOptionsForm

1 call to Link::buildOptionsForm()
1 method overrides Link::buildOptionsForm()

File

drupal/core/modules/comment/lib/Drupal/comment/Plugin/views/field/Link.php, line 29
Definition of Drupal\comment\Plugin\views\field\Link.

Class

Link
Base field handler to present a link.

Namespace

Drupal\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);
}