private function OverviewForm::getUserData in Events Log Track 8.2
Return user link.
1 call to OverviewForm::getUserData()
- OverviewForm::buildForm in src/OverviewForm.php 
- Form constructor.
File
- src/OverviewForm.php, line 49 
Class
- OverviewForm
- Configure user settings for this site.
Namespace
Drupal\event_log_trackCode
private function getUserData($uid) {
  if (empty($uid)) {
    return Markup::create('<em>' . $this
      ->t('Anonymous') . '</em>');
  }
  $account = $this->userStorage
    ->load($uid);
  if (empty($account)) {
    return Markup::create('<em>' . $this
      ->t('@uid (deleted)', [
      '@uid' => $uid,
    ]) . '<em>');
  }
  return Link::fromTextAndUrl($account
    ->getUsername(), Url::fromUri('internal:/user/' . $account
    ->id()));
}