public function LearningPathAchievementController::index in Opigno Learning path 8
Same name and namespace in other branches
- 3.x src/Controller/LearningPathAchievementController.php \Drupal\opigno_learning_path\Controller\LearningPathAchievementController::index()
Returns index array.
Parameters
int $page: Page id.
Return value
array Index array.
1 string reference to 'LearningPathAchievementController::index'
File
- src/
Controller/ LearningPathAchievementController.php, line 1153
Class
- LearningPathAchievementController
- Class LearningPathAchievementController.
Namespace
Drupal\opigno_learning_path\ControllerCode
public function index($page = 0) {
$profile = file_exists('profiles/opigno_lms/libraries/slick/slick/slick.css') ? '_profile' : '';
$content = [
'#type' => 'container',
'#attributes' => [
'id' => 'achievements-wrapper',
],
[
'#theme' => 'opigno_learning_path_message',
'#markup' => t('Consult your results and download the certificates for the trainings.'),
],
'#attached' => [
'library' => [
'opigno_learning_path/achievements',
'opigno_learning_path/achievements_slick' . $profile,
],
],
];
$content[] = $this
->build_page($page);
return $content;
}