Override init function to add uid and homepage fields.
Overrides FieldPluginBase::init
File
- drupal/core/modules/comment/lib/Drupal/comment/Plugin/views/field/Username.php, line 29
- Definition of Drupal\comment\Plugin\views\field\Username.
Class
- Username
- Field handler to allow linking to a user account or homepage.
Namespace
Drupal\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';
}