You are here

public function Domain::buildOptionsForm in Domain Access 8

Provide a form to edit options for this plugin.

Overrides PluginBase::buildOptionsForm

File

domain/src/Plugin/views/access/Domain.php, line 127

Class

Domain
Access plugin that provides domain-based access control.

Namespace

Drupal\domain\Plugin\views\access

Code

public function buildOptionsForm(&$form, FormStateInterface $form_state) {
  parent::buildOptionsForm($form, $form_state);
  $form['domain'] = [
    '#type' => 'checkboxes',
    '#title' => $this
      ->t('Domain'),
    '#default_value' => $this->options['domain'],
    '#options' => $this->domainStorage
      ->loadOptionsList(),
    '#description' => $this
      ->t('Only the checked domain(s) will be able to access this display.'),
  ];
}