ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilStudyProgrammeAutoMembershipSource.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
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 public function __construct(
41 protected int $prg_obj_id,
42 protected string $source_type,
43 protected int $source_id,
44 protected bool $enabled,
45 protected int $last_edited_usr_id,
46 protected DateTimeImmutable $last_edited,
47 protected bool $search_recursive
48 ) {
49 if (!in_array($source_type, [
50 self::TYPE_ROLE,
51 self::TYPE_GROUP,
52 self::TYPE_COURSE,
53 self::TYPE_ORGU
54 ])) {
55 throw new InvalidArgumentException("Invalid source-type: " . $source_type, 1);
56 }
57 }
58
59 public function getPrgObjId(): int
60 {
61 return $this->prg_obj_id;
62 }
63
64 public function getSourceType(): string
65 {
66 return $this->source_type;
67 }
68
69 public function getSourceId(): int
70 {
71 return $this->source_id;
72 }
73
74 public function isEnabled(): bool
75 {
76 return $this->enabled;
77 }
78
79 public function getLastEditorId(): int
80 {
81 return $this->last_edited_usr_id;
82 }
83
84 public function getLastEdited(): DateTimeImmutable
85 {
86 return $this->last_edited;
87 }
88
89 public function isSearchRecursive(): bool
90 {
91 return $this->search_recursive;
92 }
93}
__construct(protected int $prg_obj_id, protected string $source_type, protected int $source_id, protected bool $enabled, protected int $last_edited_usr_id, protected DateTimeImmutable $last_edited, protected bool $search_recursive)