You are here

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

Override init function to add uid and homepage fields.

Overrides FieldPluginBase::init

File

lib/Views/comment/Plugin/views/field/Username.php, line 29
Definition of Views\comment\Plugin\views\field\Username.

Class

Username
Field handler to allow linking to a user account or homepage.

Namespace

Views\comment\Plugin\views\field

Code

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