public function LearningPathAchievementController::index in Opigno Learning path 3.x
Same name and namespace in other branches
- 8 src/Controller/LearningPathAchievementController.php \Drupal\opigno_learning_path\Controller\LearningPathAchievementController::index()
Returns index array.
Parameters
int $page: Page id.
Return value
array Index array.
File
- src/
Controller/ LearningPathAchievementController.php, line 1150
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;
}