ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\ILIASObject\Properties\Properties Class Reference
+ Collaboration diagram for ILIAS\ILIASObject\Properties\Properties:

Public Member Functions

 __construct (private CoreProperties $core_properties, private CorePropertiesRepository $core_properties_repository, private AdditionalProperties $additional_properties, private AdditionalPropertiesRepository $additional_properties_repository, private ?Translations $translations, private TranslationsRepository $translations_repository, private LOMServices $lom_services)
 
 storeCoreProperties ()
 
 getOwner ()
 
 withOwner (int $owner)
 
 getImportId ()
 
 withImportId (string $import_id)
 
 getPropertyTitleAndDescription ()
 
 withPropertyTitleAndDescription (TitleAndDescription $property_title_and_description)
 
 storePropertyTitleAndDescription (TitleAndDescription $property_title_and_description)
 
 getPropertyIsOnline ()
 
 storePropertyIsOnline (Online $property_is_online)
 
 withPropertyIsOnline (Online $property_is_online)
 
 getPropertyTitleAndIconVisibility ()
 
 storePropertyTitleAndIconVisibility (TitleAndIconVisibility $property_title_and_icon_visibility)
 
 getPropertyHeaderActionVisibility ()
 
 storePropertyHeaderActionVisibility (HeaderActionVisibility $property_header_action_visibility)
 
 getPropertyInfoTabVisibility ()
 
 storePropertyInfoTabVisibility (InfoTabVisibility $property_info_tab_visibility)
 
 getPropertyTileImage ()
 
 storePropertyTileImage (PropertyTileImage $property_tile_image)
 
 getPropertyIcon ()
 
 storePropertyIcon (Icon $property_icon)
 
 getPropertyTranslations ()
 
 storePropertyTranslations (Translations $translations)
 
 deletePropertyTranslations ()
 
 clonePropertyTranslations (int $new_obj_id)
 

Private Member Functions

 updateMetadataForTitleAndDescription (string $title, string $description)
 

Detailed Description

Definition at line 39 of file Properties.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\ILIASObject\Properties\Properties::__construct ( private CoreProperties  $core_properties,
private CorePropertiesRepository  $core_properties_repository,
private AdditionalProperties  $additional_properties,
private AdditionalPropertiesRepository  $additional_properties_repository,
private ?Translations  $translations,
private TranslationsRepository  $translations_repository,
private LOMServices  $lom_services 
)

Definition at line 41 of file Properties.php.

49 {
50 }

Member Function Documentation

◆ clonePropertyTranslations()

ILIAS\ILIASObject\Properties\Properties::clonePropertyTranslations ( int  $new_obj_id)

Definition at line 219 of file Properties.php.

220 {
221 return $this->translations_repository->store(
222 $this->translations->copy($new_obj_id)
223 );
224 }
Class handles translation mode for an object.

◆ deletePropertyTranslations()

ILIAS\ILIASObject\Properties\Properties::deletePropertyTranslations ( )

Definition at line 214 of file Properties.php.

214 : void
215 {
216 $this->translations_repository->delete($this->translations->getObjId());
217 }

◆ getImportId()

ILIAS\ILIASObject\Properties\Properties::getImportId ( )

Definition at line 73 of file Properties.php.

73 : string
74 {
75 return $this->core_properties->getImportId();
76 }

◆ getOwner()

ILIAS\ILIASObject\Properties\Properties::getOwner ( )

Definition at line 61 of file Properties.php.

61 : int
62 {
63 return $this->core_properties->getOwner();
64 }

◆ getPropertyHeaderActionVisibility()

ILIAS\ILIASObject\Properties\Properties::getPropertyHeaderActionVisibility ( )

Definition at line 147 of file Properties.php.

147 : Property
148 {
149 return $this->additional_properties->getPropertyHeaderActionVisibility();
150 }

◆ getPropertyIcon()

ILIAS\ILIASObject\Properties\Properties::getPropertyIcon ( )

Definition at line 189 of file Properties.php.

189 : Property
190 {
191 return $this->additional_properties->getPropertyIcon();
192 }

◆ getPropertyInfoTabVisibility()

ILIAS\ILIASObject\Properties\Properties::getPropertyInfoTabVisibility ( )

Definition at line 161 of file Properties.php.

161 : Property
162 {
163 return $this->additional_properties->getPropertyInfoTabVisibility();
164 }

◆ getPropertyIsOnline()

ILIAS\ILIASObject\Properties\Properties::getPropertyIsOnline ( )

Definition at line 112 of file Properties.php.

112 : Online
113 {
114 return $this->core_properties->getPropertyIsOnline();
115 }

◆ getPropertyTileImage()

ILIAS\ILIASObject\Properties\Properties::getPropertyTileImage ( )

Definition at line 175 of file Properties.php.

175 : PropertyTileImage
176 {
177 return $this->core_properties->getPropertyTileImage();
178 }

◆ getPropertyTitleAndDescription()

ILIAS\ILIASObject\Properties\Properties::getPropertyTitleAndDescription ( )

Definition at line 85 of file Properties.php.

86 {
87 return $this->core_properties->getPropertyTitleAndDescription();
88 }

◆ getPropertyTitleAndIconVisibility()

ILIAS\ILIASObject\Properties\Properties::getPropertyTitleAndIconVisibility ( )

Definition at line 133 of file Properties.php.

133 : Property
134 {
135 return $this->additional_properties->getPropertyTitleAndIconVisibility();
136 }

◆ getPropertyTranslations()

ILIAS\ILIASObject\Properties\Properties::getPropertyTranslations ( )

Definition at line 203 of file Properties.php.

204 {
205 return $this->translations;
206 }

◆ storeCoreProperties()

ILIAS\ILIASObject\Properties\Properties::storeCoreProperties ( )

Definition at line 52 of file Properties.php.

52 : void
53 {
54 $this->core_properties_repository->store($this->core_properties);
56 $this->core_properties->getPropertyTitleAndDescription()->getTitle(),
57 $this->core_properties->getPropertyTitleAndDescription()->getDescription()
58 );
59 }
updateMetadataForTitleAndDescription(string $title, string $description)
Definition: Properties.php:226

References ILIAS\ILIASObject\Properties\Properties\updateMetadataForTitleAndDescription().

+ Here is the call graph for this function:

◆ storePropertyHeaderActionVisibility()

ILIAS\ILIASObject\Properties\Properties::storePropertyHeaderActionVisibility ( HeaderActionVisibility  $property_header_action_visibility)

Definition at line 152 of file Properties.php.

154 : void {
155 $this->additional_properties = $this->additional_properties_repository->store(
156 $this->additional_properties
157 ->withPropertyHeaderActionVisibility($property_header_action_visibility)
158 );
159 }

◆ storePropertyIcon()

ILIAS\ILIASObject\Properties\Properties::storePropertyIcon ( Icon  $property_icon)

Definition at line 194 of file Properties.php.

196 : void {
197 $this->additional_properties = $this->additional_properties_repository->store(
198 $this->additional_properties
199 ->withPropertyIcon($property_icon)
200 );
201 }

◆ storePropertyInfoTabVisibility()

ILIAS\ILIASObject\Properties\Properties::storePropertyInfoTabVisibility ( InfoTabVisibility  $property_info_tab_visibility)

Definition at line 166 of file Properties.php.

168 : void {
169 $this->additional_properties = $this->additional_properties_repository->store(
170 $this->additional_properties
171 ->withPropertyInfoTabVisibility($property_info_tab_visibility)
172 );
173 }

◆ storePropertyIsOnline()

ILIAS\ILIASObject\Properties\Properties::storePropertyIsOnline ( Online  $property_is_online)

Definition at line 117 of file Properties.php.

117 : void
118 {
119 $this->core_properties = $this->core_properties_repository->store(
120 $this->core_properties->withPropertyIsOnline($property_is_online)
121 );
122 }

◆ storePropertyTileImage()

ILIAS\ILIASObject\Properties\Properties::storePropertyTileImage ( PropertyTileImage  $property_tile_image)

Definition at line 180 of file Properties.php.

182 : void {
183 $this->core_properties = $this->core_properties_repository->store(
184 $this->core_properties
185 ->withPropertyTileImage($property_tile_image)
186 );
187 }

◆ storePropertyTitleAndDescription()

ILIAS\ILIASObject\Properties\Properties::storePropertyTitleAndDescription ( TitleAndDescription  $property_title_and_description)

Definition at line 99 of file Properties.php.

101 : void {
102 $this->core_properties = $this->core_properties_repository->store(
103 $this->core_properties
104 ->withPropertyTitleAndDescription($property_title_and_description)
105 );
107 $property_title_and_description->getTitle(),
108 $property_title_and_description->getLongDescription()
109 );
110 }
withPropertyTitleAndDescription(TitleAndDescription $property_title_and_description)
Definition: Properties.php:90

◆ storePropertyTitleAndIconVisibility()

ILIAS\ILIASObject\Properties\Properties::storePropertyTitleAndIconVisibility ( TitleAndIconVisibility  $property_title_and_icon_visibility)

Definition at line 138 of file Properties.php.

140 : void {
141 $this->additional_properties = $this->additional_properties_repository->store(
142 $this->additional_properties
143 ->withPropertyTitleAndIconVisibility($property_title_and_icon_visibility)
144 );
145 }

◆ storePropertyTranslations()

ILIAS\ILIASObject\Properties\Properties::storePropertyTranslations ( Translations  $translations)

Definition at line 208 of file Properties.php.

210 : void {
211 $this->translations = $this->translations_repository->store($translations);
212 }

◆ updateMetadataForTitleAndDescription()

ILIAS\ILIASObject\Properties\Properties::updateMetadataForTitleAndDescription ( string  $title,
string  $description 
)
private

Definition at line 226 of file Properties.php.

229 : void {
230 $paths = $this->lom_services->paths();
231 $obj_id = $this->core_properties->getObjectId();
232 $type = $this->core_properties->getType();
233
234 /*
235 * This is a hacky solution to distinguish between
236 * objects with LOM support and without. In the future, proper
237 * infrastructure to make that distinction should be added.
238 */
239 $title_data = $this->lom_services->read($obj_id, 0, $type, $paths->title())
240 ->firstData($paths->title());
241 if ($title_data->type() === LOMType::NULL) {
242 return;
243 }
244
245 $manipulator = $this->lom_services->manipulate($obj_id, 0, $type)
246 ->prepareCreateOrUpdate($paths->title(), $title);
247 if ($description !== '') {
248 $manipulator = $manipulator->prepareCreateOrUpdate($paths->firstDescription(), $description);
249 } else {
250 $manipulator = $manipulator->prepareDelete($paths->firstDescription());
251 }
252 $manipulator->execute();
253 }

Referenced by ILIAS\ILIASObject\Properties\Properties\storeCoreProperties().

+ Here is the caller graph for this function:

◆ withImportId()

ILIAS\ILIASObject\Properties\Properties::withImportId ( string  $import_id)

Definition at line 78 of file Properties.php.

78 : self
79 {
80 $clone = clone $this;
81 $clone->core_properties = $this->core_properties->withImportId($import_id);
82 return $clone;
83 }

◆ withOwner()

ILIAS\ILIASObject\Properties\Properties::withOwner ( int  $owner)

Definition at line 66 of file Properties.php.

66 : self
67 {
68 $clone = clone $this;
69 $clone->core_properties = $this->core_properties->withOwner($owner);
70 return $clone;
71 }

◆ withPropertyIsOnline()

ILIAS\ILIASObject\Properties\Properties::withPropertyIsOnline ( Online  $property_is_online)

Definition at line 124 of file Properties.php.

126 : self {
127 $clone = clone $this;
128 $clone->core_properties = $this->core_properties
129 ->withPropertyIsOnline($property_is_online);
130 return $clone;
131 }

◆ withPropertyTitleAndDescription()

ILIAS\ILIASObject\Properties\Properties::withPropertyTitleAndDescription ( TitleAndDescription  $property_title_and_description)

Definition at line 90 of file Properties.php.

92 : self {
93 $clone = clone $this;
94 $clone->core_properties = $this->core_properties
95 ->withPropertyTitleAndDescription($property_title_and_description);
96 return $clone;
97 }

The documentation for this class was generated from the following file: