function opigno_learning_path_get_routes_steps in Opigno Learning path 8
Same name and namespace in other branches
- 3.x opigno_learning_path.module \opigno_learning_path_get_routes_steps()
Returns routes steps.
4 calls to opigno_learning_path_get_routes_steps()
- LearningPathStepsController::contentSteps in src/
Controller/ LearningPathStepsController.php - Steps.
- LearningPathValidator::stepsValidate in src/
LearningPathValidator.php - Redirect user if one of learning path steps aren't completed.
- opigno_learning_path_get_current_step in ./
opigno_learning_path.module - Returns current step.
- opigno_learning_path_validate_group_creating_steps in ./
opigno_learning_path.module - Detects if all steps of creating learning path are correctly filled.
File
- ./
opigno_learning_path.module, line 1034 - Contains opigno_learning_path.module.
Code
function opigno_learning_path_get_routes_steps() {
$type = opigno_learning_path_get_group_type();
$steps = [];
if ($type == 'learning_path') {
$steps = [
'entity.group.add_form' => 1,
'entity.group.edit_form' => 1,
'opigno_group_manager.manager.index' => 2,
'opigno_learning_path.learning_path_courses' => 3,
'opigno_learning_path.learning_path_modules' => 4,
'opigno_learning_path.membership.overview' => 5,
'entity.group_content.add_form' => 5,
];
}
elseif ($type == 'opigno_course') {
$steps = [
'entity.group.add_form' => 1,
'entity.group.edit_form' => 1,
'opigno_learning_path.learning_path_courses' => 2,
'opigno_learning_path.learning_path_modules' => 3,
];
}
elseif ($type == 'opigno_module') {
$steps = [
'opigno_module.add' => 1,
'opigno_module.edit' => 1,
'opigno_module.modules' => 2,
'opigno_module.activities_bank' => 3,
];
}
elseif ($type == 'opigno_class') {
$steps = [
'entity.group.add_form' => 1,
'entity.group.edit_form' => 1,
'opigno_learning_path.membership.overview' => 2,
'entity.group_content.add_form' => 2,
];
}
return $steps;
}