You are here

public function Role::buildOptionsForm in Views (for Drupal 7) 8.3

Provide the default form for setting options.

Overrides AccessPluginBase::buildOptionsForm

File

lib/Views/user/Plugin/views/access/Role.php, line 63
Definition of Views\user\Plugin\views\access\Role.

Class

Role
Access plugin that provides role-based access control.

Namespace

Views\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.'),
  );
}