protected function LearningPathAchievementController::build_step_name in Opigno Learning path 8
Same name and namespace in other branches
- 3.x src/Controller/LearningPathAchievementController.php \Drupal\opigno_learning_path\Controller\LearningPathAchievementController::build_step_name()
Returns step renderable array.
Parameters
array $step: Step.
Return value
array Step renderable array.
1 call to LearningPathAchievementController::build_step_name()
- LearningPathAchievementController::build_course_steps in src/
Controller/ LearningPathAchievementController.php - Returns course steps renderable array.
File
- src/
Controller/ LearningPathAchievementController.php, line 109
Class
- LearningPathAchievementController
- Class LearningPathAchievementController.
Namespace
Drupal\opigno_learning_path\ControllerCode
protected function build_step_name(array $step) {
return [
'#type' => 'container',
'#attributes' => [
'class' => [
'lp_step_name',
],
],
[
'#type' => 'html_tag',
'#tag' => 'span',
'#attributes' => [
'class' => [
'lp_step_name_title',
],
],
'#value' => $step['name'],
],
[
'#type' => 'html_tag',
'#tag' => 'span',
'#attributes' => [
'class' => [
'lp_step_name_activities',
],
],
'#value' => ' ‐ ' . $step['activities'] . ' Activities',
],
];
}