You are here

protected function LearningPathAchievementController::trainingStepContentBuild in Opigno Learning path 3.x

Prepares a render array of content.

1 call to LearningPathAchievementController::trainingStepContentBuild()
LearningPathAchievementController::build_lp_steps in src/Controller/LearningPathAchievementController.php
Returns LP steps.

File

src/Controller/LearningPathAchievementController.php, line 1176

Class

LearningPathAchievementController
Class LearningPathAchievementController.

Namespace

Drupal\opigno_learning_path\Controller

Code

protected function trainingStepContentBuild($step, $group, $user, $latest_cert_date = NULL) : array {
  $build = [];
  switch ($step['typology']) {
    case 'Module':
      return $this
        ->trainingStepModuleBuild($step, $group, $user, $latest_cert_date);
    case 'Course':
      return $this
        ->trainingStepCourseBuild($step, $group, $user, $latest_cert_date);
    case 'ILT':
      return $this
        ->trainingStepIltBuild($step, $group, $user, $latest_cert_date);
    case 'Meeting':
      return $this
        ->trainingStepMeetingBuild($step, $group, $user, $latest_cert_date);
  }
  return $build;
}