Definition at line 23 of file StaticRepository.php.
◆ __construct()
ILIAS\Component\Activities\StaticRepository::__construct |
( |
array |
$activities | ) |
|
- Parameters
-
array<Activity> | $ativities |
Definition at line 30 of file StaticRepository.php.
34 if (!($activity instanceof Activity)) {
35 throw new \InvalidArgumentException(
36 "Expected `Activity`, got: " . get_class($activity)
39 $this->activities[(string) $activity->getName()] = $activity;
◆ getActivitiesByName()
ILIAS\Component\Activities\StaticRepository::getActivitiesByName |
( |
string |
$name_matcher, |
|
|
?ActivityType |
$type = null , |
|
|
?Range |
$range = null |
|
) |
| |
Get all activities where the name matches the provided regexp.
- Parameters
-
string | $name_matcher | as preg_match can understand |
- Returns
- Iterator<string, Activity> where keys are the name
Implements ILIAS\Component\Activities\Repository.
Definition at line 43 of file StaticRepository.php.
45 foreach ($this->activities as $name => $activity) {
46 if (preg_match($name_matcher, $name)) {
47 yield $name => $activity;
◆ $activities
array ILIAS\Component\Activities\StaticRepository::$activities = [] |
|
protected |
The documentation for this class was generated from the following file: