You are here

public function UserController::course in Opigno statistics 8

Same name and namespace in other branches
  1. 3.x src/Controller/UserController.php \Drupal\opigno_statistics\Controller\UserController::course()

Builds render array for a user course statistics page.

1 string reference to 'UserController::course'
opigno_statistics.routing.yml in ./opigno_statistics.routing.yml
opigno_statistics.routing.yml

File

src/Controller/UserController.php, line 1594

Class

UserController
Class UserController.

Namespace

Drupal\opigno_statistics\Controller

Code

public function course(UserInterface $user, GroupInterface $training, GroupInterface $course) {
  $content = [];
  $content[] = $this
    ->buildCourseDetails($user, $training, $course);
  $content['#attached']['library'][] = 'opigno_statistics/user';
  return $content;
}