You are here

public function User::init in Views (for Drupal 7) 8.3

Override init function to provide generic option to link to user.

Overrides FieldPluginBase::init

1 call to User::init()
Name::init in lib/Views/user/Plugin/views/field/Name.php
Add uid in the query so we can test for anonymous if needed.
1 method overrides User::init()
Name::init in lib/Views/user/Plugin/views/field/Name.php
Add uid in the query so we can test for anonymous if needed.

File

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

Class

User
Field handler to provide simple renderer that allows linking to a user.

Namespace

Views\user\Plugin\views\field

Code

public function init(ViewExecutable $view, &$data) {
  parent::init($view, $data);
  if (!empty($this->options['link_to_user'])) {
    $this->additional_fields['uid'] = 'uid';
  }
}