public function UserController::courseModule in Opigno statistics 8
Same name and namespace in other branches
- 3.x src/Controller/UserController.php \Drupal\opigno_statistics\Controller\UserController::courseModule()
Builds render array for a user course statistics page.
Parameters
\Drupal\user\UserInterface $user: User.
\Drupal\group\Entity\GroupInterface $training: Training.
\Drupal\group\Entity\GroupInterface $course: Course.
\Drupal\opigno_module\Entity\OpignoModule $module: Module.
Return value
array Render array.
Throws
\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException
\Drupal\Component\Plugin\Exception\PluginNotFoundException
1 string reference to 'UserController::courseModule'
File
- src/
Controller/ UserController.php, line 1552
Class
- UserController
- Class UserController.
Namespace
Drupal\opigno_statistics\ControllerCode
public function courseModule(UserInterface $user, GroupInterface $training, GroupInterface $course, OpignoModule $module) {
$content = [];
$content[] = $this
->buildModuleDetails($user, $training, $course, $module);
$content['#attached']['library'][] = 'opigno_statistics/user';
return $content;
}