You are here

protected function User::defineOptions in Views (for Drupal 7) 8.3

Same name in this branch
  1. 8.3 lib/Views/user/Plugin/views/argument_default/User.php \Views\user\Plugin\views\argument_default\User::defineOptions()
  2. 8.3 lib/Views/user/Plugin/views/argument_validator/User.php \Views\user\Plugin\views\argument_validator\User::defineOptions()
  3. 8.3 lib/Views/user/Plugin/views/field/User.php \Views\user\Plugin\views\field\User::defineOptions()

Retrieve the options when this is a new access control plugin

Overrides ArgumentValidatorPluginBase::defineOptions

File

lib/Views/user/Plugin/views/argument_validator/User.php, line 29
Definition of Views\user\Plugin\views\argument_validator\User.

Class

User
Validate whether an argument is a valid user.

Namespace

Views\user\Plugin\views\argument_validator

Code

protected function defineOptions() {
  $options = parent::defineOptions();
  $options['type'] = array(
    'default' => 'uid',
  );
  $options['restrict_roles'] = array(
    'default' => FALSE,
    'bool' => TRUE,
  );
  $options['roles'] = array(
    'default' => array(),
  );
  return $options;
}