You are here

public function RelationshipPluginBase::buildOptionsForm in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/views/src/Plugin/views/relationship/RelationshipPluginBase.php \Drupal\views\Plugin\views\relationship\RelationshipPluginBase::buildOptionsForm()
  2. 10 core/modules/views/src/Plugin/views/relationship/RelationshipPluginBase.php \Drupal\views\Plugin\views\relationship\RelationshipPluginBase::buildOptionsForm()

Provide a form to edit options for this plugin.

Overrides HandlerBase::buildOptionsForm

2 calls to RelationshipPluginBase::buildOptionsForm()
GroupwiseMax::buildOptionsForm in core/modules/views/src/Plugin/views/relationship/GroupwiseMax.php
Provide a form to edit options for this plugin.
NodeTermData::buildOptionsForm in core/modules/taxonomy/src/Plugin/views/relationship/NodeTermData.php
Provide a form to edit options for this plugin.
2 methods override RelationshipPluginBase::buildOptionsForm()
GroupwiseMax::buildOptionsForm in core/modules/views/src/Plugin/views/relationship/GroupwiseMax.php
Provide a form to edit options for this plugin.
NodeTermData::buildOptionsForm in core/modules/taxonomy/src/Plugin/views/relationship/NodeTermData.php
Provide a form to edit options for this plugin.

File

core/modules/views/src/Plugin/views/relationship/RelationshipPluginBase.php, line 110

Class

RelationshipPluginBase
Simple relationship handler that allows a new version of the primary table to be linked in.

Namespace

Drupal\views\Plugin\views\relationship

Code

public function buildOptionsForm(&$form, FormStateInterface $form_state) {
  parent::buildOptionsForm($form, $form_state);
  unset($form['admin_label']['#fieldset']);
  $form['admin_label']['#weight'] = -1;
  $form['required'] = [
    '#type' => 'checkbox',
    '#title' => $this
      ->t('Require this relationship'),
    '#description' => $this
      ->t('Enable to hide items that do not contain this relationship'),
    '#default_value' => !empty($this->options['required']),
  ];
}