ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilLearningSequenceSettings.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
25{
26 protected int $obj_id;
27 protected string $abstract;
28 protected string $extro;
29 protected ?string $abstract_image;
30 protected ?string $extro_image;
31
35 protected array $uploads = [];
36
40 protected array $deletions = [];
41 protected bool $members_gallery;
42
43 public function __construct(
44 int $obj_id,
45 string $abstract = '',
46 string $extro = '',
47 ?string $abstract_image = null,
48 ?string $extro_image = null,
49 bool $members_gallery = false
50 ) {
51 $this->obj_id = $obj_id;
52 $this->abstract = $abstract;
53 $this->extro = $extro;
54 $this->abstract_image = $abstract_image;
55 $this->extro_image = $extro_image;
56 $this->members_gallery = $members_gallery;
57 }
58
59 public function getObjId(): int
60 {
61 return $this->obj_id;
62 }
63
64 public function getAbstract(): string
65 {
66 return $this->abstract;
67 }
68
70 {
71 $clone = clone $this;
72 $clone->abstract = $abstract;
73 return $clone;
74 }
75
76 public function getExtro(): string
77 {
78 return $this->extro;
79 }
80
82 {
83 $clone = clone $this;
84 $clone->extro = $extro;
85 return $clone;
86 }
87
88 public function getAbstractImage(): string
89 {
90 return $this->abstract_image ?? '';
91 }
92
93 public function withAbstractImage(?string $path = null): ilLearningSequenceSettings
94 {
95 $clone = clone $this;
96 $clone->abstract_image = $path;
97 return $clone;
98 }
99
100 public function getExtroImage(): string
101 {
102 return $this->extro_image ?? '';
103 }
104
105 public function withExtroImage(?string $path = null): ilLearningSequenceSettings
106 {
107 $clone = clone $this;
108 $clone->extro_image = $path;
109 return $clone;
110 }
111
115 public function getUploads(): array
116 {
117 return $this->uploads;
118 }
119
120 public function withUpload(array $upload_info, string $which): ilLearningSequenceSettings
121 {
122 $clone = clone $this;
123 $clone->uploads[$which] = $upload_info;
124 return $clone;
125 }
126
130 public function getDeletions(): array
131 {
132 return $this->deletions;
133 }
134
135 public function withDeletion(string $which): ilLearningSequenceSettings
136 {
137 $clone = clone $this;
138 $clone->deletions[] = $which;
139 return $clone;
140 }
141
142 public function getMembersGallery(): bool
143 {
145 }
146
148 {
149 $clone = clone $this;
150 $clone->members_gallery = $members_gallery;
151 return $clone;
152 }
153}
Settings for an LSO (like abstract, extro)
withUpload(array $upload_info, string $which)
__construct(int $obj_id, string $abstract='', string $extro='', ?string $abstract_image=null, ?string $extro_image=null, bool $members_gallery=false)
$path
Definition: ltiservices.php:30