protected function LearningPathAchievementController::build_step_name 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_step_name()
Returns step renderable array.
Parameters
array $step: Step.
Return value
array Step renderable array.
File
- src/
Controller/ LearningPathAchievementController.php, line 124
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',
],
];
}