ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilLearningHistoryProviderFactory.php
Go to the documentation of this file.
1<?php
2
24{
26
27 protected static array $providers = array(
28 ilTrackingLearningHistoryProvider::class,
29 ilBadgeLearningHistoryProvider::class,
30 ilCourseLearningHistoryProvider::class,
31 ilFirstLoginLearningHistoryProvider::class,
32 ilCertificateLearningHistoryProvider::class,
33 ilSkillLearningHistoryProvider::class
34 );
35
37 {
38 $this->service = $service;
39 }
40
47 public function getAllProviders(
48 bool $active_only = false,
49 int $user_id = 0
50 ): array {
51 $providers = array();
52
53 if ($user_id === 0) {
54 $user_id = $this->service->user()->getId();
55 }
56
57 foreach (self::$providers as $provider) {
59 $providerInstance = new $provider($user_id, $this->service->factory(), $this->service->language());
60 if (!$active_only || $providerInstance->isActive()) {
61 $providers[] = $providerInstance;
62 }
63 }
64
65 return $providers;
66 }
67}
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$provider
Definition: ltitoken.php:80