public function Role::buildOptionsForm

Provide the default form for setting options.

Overrides AccessPluginBase::buildOptionsForm

File

drupal/core/modules/user/lib/Drupal/user/Plugin/views/access/Role.php, line 71
Definition of Drupal\user\Plugin\views\access\Role.

Class

Role
Access plugin that provides role-based access control.

Namespace

Drupal\user\Plugin\views\access

Code

public function buildOptionsForm(&$form, &$form_state) {
  parent::buildOptionsForm($form, $form_state);
  $form['role'] = array(
    '#type' => 'checkboxes',
    '#title' => t('Role'),
    '#default_value' => $this->options['role'],
    '#options' => array_map('check_plain', $this
      ->getRoles()),
    '#description' => t('Only the checked roles will be able to access this display. Note that users with "access all views" can see any view, regardless of role.'),
  );
}