public function RelationshipPluginBase::buildOptionsForm

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

Overrides HandlerBase::buildOptionsForm

2 calls to RelationshipPluginBase::buildOptionsForm()
GroupwiseMax::buildOptionsForm in drupal/core/modules/views/lib/Drupal/views/Plugin/views/relationship/GroupwiseMax.php
Extends the relationship's basic options, allowing the user to pick a sort and an order for it.
NodeTermData::buildOptionsForm in drupal/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/views/relationship/NodeTermData.php
Default options form that provides the label widget that all fields should have.
3 methods override RelationshipPluginBase::buildOptionsForm()
Broken::buildOptionsForm in drupal/core/modules/views/lib/Drupal/views/Plugin/views/relationship/Broken.php
Default options form that provides the label widget that all fields should have.
GroupwiseMax::buildOptionsForm in drupal/core/modules/views/lib/Drupal/views/Plugin/views/relationship/GroupwiseMax.php
Extends the relationship's basic options, allowing the user to pick a sort and an order for it.
NodeTermData::buildOptionsForm in drupal/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/views/relationship/NodeTermData.php
Default options form that provides the label widget that all fields should have.

File

drupal/core/modules/views/lib/Drupal/views/Plugin/views/relationship/RelationshipPluginBase.php, line 89
Definition of Drupal\views\Plugin\views\relationship\RelationshipPluginBase.

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