protected function User::defineOptions

Same name in this branch
  1. 8.x drupal/core/modules/user/lib/Drupal/user/Plugin/views/field/User.php \Drupal\user\Plugin\views\field\User::defineOptions()
  2. 8.x drupal/core/modules/user/lib/Drupal/user/Plugin/views/argument_validator/User.php \Drupal\user\Plugin\views\argument_validator\User::defineOptions()
  3. 8.x drupal/core/modules/user/lib/Drupal/user/Plugin/views/argument_default/User.php \Drupal\user\Plugin\views\argument_default\User::defineOptions()

Retrieve the options when this is a new access control plugin

Overrides ArgumentValidatorPluginBase::defineOptions

File

drupal/core/modules/user/lib/Drupal/user/Plugin/views/argument_validator/User.php, line 29
Definition of Drupal\user\Plugin\views\argument_validator\User.

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['type'] = array(
    'default' => 'uid',
  );
  $options['restrict_roles'] = array(
    'default' => FALSE,
    'bool' => TRUE,
  );
  $options['roles'] = array(
    'default' => array(),
  );
  return $options;
}