function User::buildOptionsForm

Same name in this branch
  1. 9 core/modules/user/src/Plugin/views/argument_validator/User.php \Drupal\user\Plugin\views\argument_validator\User::buildOptionsForm()
Same name in other branches
  1. 8.9.x core/modules/user/src/Plugin/views/argument_validator/User.php \Drupal\user\Plugin\views\argument_validator\User::buildOptionsForm()
  2. 8.9.x core/modules/user/src/Plugin/views/argument_default/User.php \Drupal\user\Plugin\views\argument_default\User::buildOptionsForm()
  3. 10 core/modules/user/src/Plugin/views/argument_validator/User.php \Drupal\user\Plugin\views\argument_validator\User::buildOptionsForm()
  4. 10 core/modules/user/src/Plugin/views/argument_default/User.php \Drupal\user\Plugin\views\argument_default\User::buildOptionsForm()
  5. 11.x core/modules/user/src/Plugin/views/argument_validator/User.php \Drupal\user\Plugin\views\argument_validator\User::buildOptionsForm()
  6. 11.x core/modules/user/src/Plugin/views/argument_default/User.php \Drupal\user\Plugin\views\argument_default\User::buildOptionsForm()

Overrides ArgumentDefaultPluginBase::buildOptionsForm

File

core/modules/user/src/Plugin/views/argument_default/User.php, line 74

Class

User
Default argument plugin to extract a user from request.

Namespace

Drupal\user\Plugin\views\argument_default

Code

public function buildOptionsForm(&$form, FormStateInterface $form_state) {
    $form['user'] = [
        '#type' => 'checkbox',
        '#title' => $this->t('Also look for a node and use the node author'),
        '#default_value' => $this->options['user'],
    ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.