public function Roles::init

Overrides Drupal\views\Plugin\views\field\FieldPluginBase::init().

Overrides FieldPluginBase::init

File

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

Class

Roles
Field handler to provide a list of roles.

Namespace

Drupal\user\Plugin\views\field

Code

public function init(ViewExecutable $view, &$options) {
  parent::init($view, $options);
  $this->additional_fields['uid'] = array(
    'table' => 'users',
    'field' => 'uid',
  );
}