ILIAS  release_8 Revision v8.24
class.ilStudyProgrammeAutoMembershipSource.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
27{
28 public const TYPE_ROLE = 'role';
29 public const TYPE_GROUP = 'grp';
30 public const TYPE_COURSE = 'crs';
31 public const TYPE_ORGU = 'orgu';
32
33 public const SOURCE_MAPPING = [
38 ];
39
40 protected int $prg_obj_id;
41 protected string $source_type;
42 protected int $source_id;
43 protected bool $enabled;
44 protected int $last_edited_usr_id;
45 protected DateTimeImmutable $last_edited;
46
47 public function __construct(
48 int $prg_obj_id,
49 string $source_type,
50 int $source_id,
51 bool $enabled,
53 DateTimeImmutable $last_edited
54 ) {
55 if (!in_array($source_type, [
56 self::TYPE_ROLE,
57 self::TYPE_GROUP,
58 self::TYPE_COURSE,
59 self::TYPE_ORGU
60 ])) {
61 throw new InvalidArgumentException("Invalid source-type: " . $source_type, 1);
62 }
63
64 $this->prg_obj_id = $prg_obj_id;
65 $this->source_type = $source_type;
66 $this->source_id = $source_id;
67 $this->enabled = $enabled;
68 $this->last_edited_usr_id = $last_edited_usr_id;
69 $this->last_edited = $last_edited;
70 }
71
72 public function getPrgObjId(): int
73 {
74 return $this->prg_obj_id;
75 }
76
77 public function getSourceType(): string
78 {
79 return $this->source_type;
80 }
81
82 public function getSourceId(): int
83 {
84 return $this->source_id;
85 }
86
87 public function isEnabled(): bool
88 {
89 return $this->enabled;
90 }
91
92 public function getLastEditorId(): int
93 {
95 }
96
97 public function getLastEdited(): DateTimeImmutable
98 {
99 return $this->last_edited;
100 }
101}
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(int $prg_obj_id, string $source_type, int $source_id, bool $enabled, int $last_edited_usr_id, DateTimeImmutable $last_edited)