You are here

public function views_plugin_access_role::options_form in Views (for Drupal 7) 7.3

Same name and namespace in other branches
  1. 6.3 plugins/views_plugin_access_role.inc \views_plugin_access_role::options_form()
  2. 6.2 plugins/views_plugin_access_role.inc \views_plugin_access_role::options_form()

Provide the default form for setting options.

Overrides views_plugin_access::options_form

File

plugins/views_plugin_access_role.inc, line 60
Definition of views_plugin_access_role.

Class

views_plugin_access_role
Access plugin that provides role-based access control.

Code

public function options_form(&$form, &$form_state) {
  parent::options_form($form, $form_state);
  $form['role'] = array(
    '#type' => 'checkboxes',
    '#title' => t('Role'),
    '#default_value' => $this->options['role'],
    '#options' => array_map('check_plain', views_ui_get_roles()),
    '#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.'),
  );
}