/**
* The users table.
*/
protected ?string
$user_table;
/**
* The user name field.
*/
protected string
$user_field;
public function query() { $this->
ensureMyTable();
$definition =
[ 'table' => 'users_field_data',
'field' => 'uid',
'left_table' => 'comment_entity_statistics',
'left_field' => 'last_comment_uid',
];
$join = \Drupal::
service('plugin.manager.views.join'
)->
createInstance('standard',
$definition);
// @todo this might be safer if we had an ensure_relationship rather than guessing
// the table alias. Though if we did that we'd be guessing the relationship name
// so that doesn't matter that much.