You are here

protected function User::defineOptions in Drupal 8

Same name in this branch
  1. 8 core/modules/user/src/Plugin/views/argument_default/User.php \Drupal\user\Plugin\views\argument_default\User::defineOptions()
  2. 8 core/modules/user/src/Plugin/views/argument_validator/User.php \Drupal\user\Plugin\views\argument_validator\User::defineOptions()
Same name and namespace in other branches
  1. 9 core/modules/user/src/Plugin/views/argument_validator/User.php \Drupal\user\Plugin\views\argument_validator\User::defineOptions()
  2. 10 core/modules/user/src/Plugin/views/argument_validator/User.php \Drupal\user\Plugin\views\argument_validator\User::defineOptions()

Retrieves the options when this is a new access control plugin.

Overrides Entity::defineOptions

File

core/modules/user/src/Plugin/views/argument_validator/User.php, line 40

Class

User
Validate whether an argument is a valid user.

Namespace

Drupal\user\Plugin\views\argument_validator

Code

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