You are here

protected function LearningPathAchievementController::build_training in Opigno Learning path 8

Same name and namespace in other branches
  1. 3.x 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

File

src/Controller/LearningPathAchievementController.php, line 964

Class

LearningPathAchievementController
Class LearningPathAchievementController.

Namespace

Drupal\opigno_learning_path\Controller

Code

protected function build_training(GroupInterface $group) {
  return [
    '#theme' => 'opigno_learning_path_training',
    '#label' => $group
      ->label(),
    'timeline' => $this
      ->build_training_timeline($group),
    'info' => [
      '#theme' => 'opigno_learning_path_training_timeline_info',
      '#label' => t('Timeline'),
      '#text' => t('In your timeline are shown only successfully passed mandatory steps from your training'),
    ],
    'summary' => $this
      ->build_training_summary($group),
    'details' => [
      '#theme' => 'opigno_learning_path_training_details',
      '#group_id' => $group
        ->id(),
    ],
  ];
}