You are here

public function GroupToGroupContent::buildOptionsForm in Group 2.0.x

Same name and namespace in other branches
  1. 8 src/Plugin/views/relationship/GroupToGroupContent.php \Drupal\group\Plugin\views\relationship\GroupToGroupContent::buildOptionsForm()

Provide a form to edit options for this plugin.

Overrides RelationshipPluginBase::buildOptionsForm

File

src/Plugin/views/relationship/GroupToGroupContent.php, line 81

Class

GroupToGroupContent
A relationship handler for group content.

Namespace

Drupal\group\Plugin\views\relationship

Code

public function buildOptionsForm(&$form, FormStateInterface $form_state) {
  parent::buildOptionsForm($form, $form_state);
  $form['group_content_plugins'] = [
    '#type' => 'checkboxes',
    '#title' => $this
      ->t('Filter by plugin'),
    '#description' => $this
      ->t('Refine the result by plugin. Leave empty to select all plugins, including those that could be added after this relationship was configured.'),
    '#options' => $this
      ->getContentPluginOptions(),
    '#weight' => -2,
    '#default_value' => $this->options['group_content_plugins'],
  ];
}