protected function LearningPathAchievementController::build_training in Opigno Learning path 3.x
Same name and namespace in other branches
- 8 src/Controller/LearningPathAchievementController.php \Drupal\opigno_learning_path\Controller\LearningPathAchievementController::build_training()
Returns training array.
Parameters
\Drupal\group\Entity\GroupInterface $group: Group.
Return value
array Training array.
Throws
\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException
\Drupal\Component\Plugin\Exception\PluginException
\Drupal\Component\Plugin\Exception\PluginNotFoundException
2 calls to LearningPathAchievementController::build_training()
- LearningPathAchievementController::buildTrainingProgress in src/
Controller/ LearningPathAchievementController.php - Returns training progress page.
- LearningPathAchievementController::build_page in src/
Controller/ LearningPathAchievementController.php - Returns training page array.
File
- src/
Controller/ LearningPathAchievementController.php, line 936
Class
- LearningPathAchievementController
- Class LearningPathAchievementController.
Namespace
Drupal\opigno_learning_path\ControllerCode
protected function build_training(GroupInterface $group = NULL, AccountInterface $account = NULL) {
return [
'#theme' => 'opigno_learning_path_training',
'#label' => $group
->label(),
'summary' => $this
->build_training_summary($group, $account),
'details' => $this
->build_lp_steps($group, $account),
'image' => $group
->get('field_learning_path_media_image')
->view([
'label' => 'hidden',
'type' => 'media_thumbnail',
'settings' => [
'image_style' => 'medium',
],
]),
];
}