You are here

public function TrackDaFilesController::table_user_report in Track da files 8

* Builds a table which shows datas for a specific user.

1 string reference to 'TrackDaFilesController::table_user_report'
track_da_files.routing.yml in ./track_da_files.routing.yml
track_da_files.routing.yml

File

src/Controller/TrackDaFilesController.php, line 63

Class

TrackDaFilesController
Class TrackDaFilesController.

Namespace

Drupal\track_da_files\Controller

Code

public function table_user_report($uid) {
  $output = '';
  $account = \Drupal\user\Entity\User::load($uid);
  if ($uid == '0') {
    $output .= '<p>' . t('Datas for anonymous users') . '</p>';
  }
  else {
    $name = $account
      ->getUsername();
    $output .= '<p>' . t('Datas for @username', array(
      '@username' => $name,
    )) . '</p>';
  }
  $build = $this
    ->table_build_user_report($uid);

  //$build['form'] = \Drupal::formBuilder()->getForm('\Drupal\track_da_files\Form\TrackDaFilesUserTableActionForm'/*, $extra*/);
  return $build;
}