19 declare(strict_types=1);
38 $this->core_properties_repository->store($this->core_properties);
40 $this->core_properties->getPropertyTitleAndDescription()->getTitle(),
41 $this->core_properties->getPropertyTitleAndDescription()->getDescription()
47 return $this->core_properties->getOwner();
53 $clone->core_properties = $this->core_properties->withOwner($owner);
59 return $this->core_properties->getImportId();
65 $clone->core_properties = $this->core_properties->withImportId($import_id);
71 return $this->core_properties->getPropertyTitleAndDescription();
78 $clone->core_properties = $this->core_properties
79 ->withPropertyTitleAndDescription($property_title_and_description);
86 $this->core_properties = $this->core_properties_repository->store(
87 $this->core_properties
91 $property_title_and_description->
getTitle(),
98 return $this->core_properties->getPropertyIsOnline();
103 $this->core_properties = $this->core_properties_repository->store(
104 $this->core_properties->withPropertyIsOnline($property_is_online)
111 $clone = clone $this;
112 $clone->core_properties = $this->core_properties
113 ->withPropertyIsOnline($property_is_online);
119 return $this->additional_properties->getPropertyTitleAndIconVisibility();
125 $this->additional_properties = $this->additional_properties_repository->store(
126 $this->additional_properties
127 ->withPropertyTitleAndIconVisibility($property_title_and_icon_visibility)
133 return $this->additional_properties->getPropertyHeaderActionVisibility();
139 $this->additional_properties = $this->additional_properties_repository->store(
140 $this->additional_properties
141 ->withPropertyHeaderActionVisibility($property_header_action_visibility)
147 return $this->additional_properties->getPropertyInfoTabVisibility();
153 $this->additional_properties = $this->additional_properties_repository->store(
154 $this->additional_properties
155 ->withPropertyInfoTabVisibility($property_info_tab_visibility)
161 return $this->core_properties->getPropertyTileImage();
167 $this->core_properties = $this->core_properties_repository->store(
168 $this->core_properties
169 ->withPropertyTileImage($property_tile_image)
175 return $this->additional_properties->getPropertyIcon();
181 $this->additional_properties = $this->additional_properties_repository->store(
182 $this->additional_properties
183 ->withPropertyIcon($property_icon)
191 $paths = $this->lom_services->paths();
192 $obj_id = $this->core_properties->getObjectId();
193 $type = $this->core_properties->getType();
200 $title_data = $this->lom_services->read($obj_id, 0, $type, $paths->title())
201 ->firstData($paths->title());
202 if ($title_data->type() === LOMType::NULL) {
206 $manipulator = $this->lom_services->manipulate($obj_id, 0, $type)
207 ->prepareCreateOrUpdate($paths->title(), $title);
208 if ($description !==
'') {
209 $manipulator = $manipulator->prepareCreateOrUpdate($paths->firstDescription(), $description);
211 $manipulator = $manipulator->prepareDelete($paths->firstDescription());
213 $manipulator->execute();
__construct(private ilObjectCoreProperties $core_properties, private ilObjectCorePropertiesRepository $core_properties_repository, private ilObjectAdditionalProperties $additional_properties, private ilObjectAdditionalPropertiesRepository $additional_properties_repository, private LOMServices $lom_services)
withPropertyTitleAndDescription(ilObjectPropertyTitleAndDescription $property_title_and_description)
storePropertyIsOnline(ilObjectPropertyIsOnline $property_is_online)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
withImportId(string $import_id)
getPropertyTitleAndDescription()
storePropertyTileImage(ilObjectPropertyTileImage $property_tile_image)
storePropertyTitleAndDescription(ilObjectPropertyTitleAndDescription $property_title_and_description)
storePropertyInfoTabVisibility(ilObjectPropertyInfoTabVisibility $property_info_tab_visibility)
getPropertyHeaderActionVisibility()
storePropertyHeaderActionVisibility(ilObjectPropertyHeaderActionVisibility $property_header_action_visibility)
updateMetadataForTitleAndDescription(string $title, string $description)
withPropertyIsOnline(ilObjectPropertyIsOnline $property_is_online)
getPropertyTitleAndIconVisibility()
storePropertyTitleAndIconVisibility(ilObjectPropertyTitleAndIconVisibility $property_title_and_icon_visibility)
getPropertyInfoTabVisibility()
storePropertyIcon(ilObjectPropertyIcon $property_icon)