ILIAS  trunk Revision v11.0_alpha-1811-gd2d5443e411
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilObjectProperties Class Reference
+ Collaboration diagram for ilObjectProperties:

Public Member Functions

 __construct (private ilObjectCoreProperties $core_properties, private ilObjectCorePropertiesRepository $core_properties_repository, private ilObjectAdditionalProperties $additional_properties, private ilObjectAdditionalPropertiesRepository $additional_properties_repository, private LOMServices $lom_services)
 
 storeCoreProperties ()
 
 getOwner ()
 
 withOwner (int $owner)
 
 getImportId ()
 
 withImportId (string $import_id)
 
 getPropertyTitleAndDescription ()
 
 withPropertyTitleAndDescription (ilObjectPropertyTitleAndDescription $property_title_and_description)
 
 storePropertyTitleAndDescription (ilObjectPropertyTitleAndDescription $property_title_and_description)
 
 getPropertyIsOnline ()
 
 storePropertyIsOnline (ilObjectPropertyIsOnline $property_is_online)
 
 withPropertyIsOnline (ilObjectPropertyIsOnline $property_is_online)
 
 getPropertyTitleAndIconVisibility ()
 
 storePropertyTitleAndIconVisibility (ilObjectPropertyTitleAndIconVisibility $property_title_and_icon_visibility)
 
 getPropertyHeaderActionVisibility ()
 
 storePropertyHeaderActionVisibility (ilObjectPropertyHeaderActionVisibility $property_header_action_visibility)
 
 getPropertyInfoTabVisibility ()
 
 storePropertyInfoTabVisibility (ilObjectPropertyInfoTabVisibility $property_info_tab_visibility)
 
 getPropertyTileImage ()
 
 storePropertyTileImage (ilObjectPropertyTileImage $property_tile_image)
 
 getPropertyIcon ()
 
 storePropertyIcon (ilObjectPropertyIcon $property_icon)
 

Private Member Functions

 updateMetadataForTitleAndDescription (string $title, string $description)
 

Detailed Description

Definition at line 25 of file class.ilObjectProperties.php.

Constructor & Destructor Documentation

◆ __construct()

ilObjectProperties::__construct ( private ilObjectCoreProperties  $core_properties,
private ilObjectCorePropertiesRepository  $core_properties_repository,
private ilObjectAdditionalProperties  $additional_properties,
private ilObjectAdditionalPropertiesRepository  $additional_properties_repository,
private LOMServices  $lom_services 
)

Definition at line 27 of file class.ilObjectProperties.php.

33  {
34  }

Member Function Documentation

◆ getImportId()

ilObjectProperties::getImportId ( )

Definition at line 57 of file class.ilObjectProperties.php.

57  : string
58  {
59  return $this->core_properties->getImportId();
60  }

◆ getOwner()

ilObjectProperties::getOwner ( )

Definition at line 45 of file class.ilObjectProperties.php.

45  : int
46  {
47  return $this->core_properties->getOwner();
48  }

◆ getPropertyHeaderActionVisibility()

ilObjectProperties::getPropertyHeaderActionVisibility ( )

Definition at line 131 of file class.ilObjectProperties.php.

132  {
133  return $this->additional_properties->getPropertyHeaderActionVisibility();
134  }

◆ getPropertyIcon()

ilObjectProperties::getPropertyIcon ( )

Definition at line 173 of file class.ilObjectProperties.php.

174  {
175  return $this->additional_properties->getPropertyIcon();
176  }

◆ getPropertyInfoTabVisibility()

ilObjectProperties::getPropertyInfoTabVisibility ( )

Definition at line 145 of file class.ilObjectProperties.php.

146  {
147  return $this->additional_properties->getPropertyInfoTabVisibility();
148  }

◆ getPropertyIsOnline()

ilObjectProperties::getPropertyIsOnline ( )

Definition at line 96 of file class.ilObjectProperties.php.

Referenced by ilObjTest\removeQuestionWithResults().

97  {
98  return $this->core_properties->getPropertyIsOnline();
99  }
+ Here is the caller graph for this function:

◆ getPropertyTileImage()

ilObjectProperties::getPropertyTileImage ( )

Definition at line 159 of file class.ilObjectProperties.php.

160  {
161  return $this->core_properties->getPropertyTileImage();
162  }

◆ getPropertyTitleAndDescription()

ilObjectProperties::getPropertyTitleAndDescription ( )

Definition at line 69 of file class.ilObjectProperties.php.

70  {
71  return $this->core_properties->getPropertyTitleAndDescription();
72  }

◆ getPropertyTitleAndIconVisibility()

ilObjectProperties::getPropertyTitleAndIconVisibility ( )

Definition at line 117 of file class.ilObjectProperties.php.

118  {
119  return $this->additional_properties->getPropertyTitleAndIconVisibility();
120  }

◆ storeCoreProperties()

ilObjectProperties::storeCoreProperties ( )

Definition at line 36 of file class.ilObjectProperties.php.

References updateMetadataForTitleAndDescription().

36  : void
37  {
38  $this->core_properties_repository->store($this->core_properties);
40  $this->core_properties->getPropertyTitleAndDescription()->getTitle(),
41  $this->core_properties->getPropertyTitleAndDescription()->getDescription()
42  );
43  }
updateMetadataForTitleAndDescription(string $title, string $description)
+ Here is the call graph for this function:

◆ storePropertyHeaderActionVisibility()

ilObjectProperties::storePropertyHeaderActionVisibility ( ilObjectPropertyHeaderActionVisibility  $property_header_action_visibility)

Definition at line 136 of file class.ilObjectProperties.php.

138  : void {
139  $this->additional_properties = $this->additional_properties_repository->store(
140  $this->additional_properties
141  ->withPropertyHeaderActionVisibility($property_header_action_visibility)
142  );
143  }

◆ storePropertyIcon()

ilObjectProperties::storePropertyIcon ( ilObjectPropertyIcon  $property_icon)

Definition at line 178 of file class.ilObjectProperties.php.

180  : void {
181  $this->additional_properties = $this->additional_properties_repository->store(
182  $this->additional_properties
183  ->withPropertyIcon($property_icon)
184  );
185  }

◆ storePropertyInfoTabVisibility()

ilObjectProperties::storePropertyInfoTabVisibility ( ilObjectPropertyInfoTabVisibility  $property_info_tab_visibility)

Definition at line 150 of file class.ilObjectProperties.php.

152  : void {
153  $this->additional_properties = $this->additional_properties_repository->store(
154  $this->additional_properties
155  ->withPropertyInfoTabVisibility($property_info_tab_visibility)
156  );
157  }

◆ storePropertyIsOnline()

ilObjectProperties::storePropertyIsOnline ( ilObjectPropertyIsOnline  $property_is_online)

Definition at line 101 of file class.ilObjectProperties.php.

Referenced by ilObjTest\removeQuestionWithResults().

101  : void
102  {
103  $this->core_properties = $this->core_properties_repository->store(
104  $this->core_properties->withPropertyIsOnline($property_is_online)
105  );
106  }
+ Here is the caller graph for this function:

◆ storePropertyTileImage()

ilObjectProperties::storePropertyTileImage ( ilObjectPropertyTileImage  $property_tile_image)

Definition at line 164 of file class.ilObjectProperties.php.

166  : void {
167  $this->core_properties = $this->core_properties_repository->store(
168  $this->core_properties
169  ->withPropertyTileImage($property_tile_image)
170  );
171  }

◆ storePropertyTitleAndDescription()

ilObjectProperties::storePropertyTitleAndDescription ( ilObjectPropertyTitleAndDescription  $property_title_and_description)

Definition at line 83 of file class.ilObjectProperties.php.

References ilObjectPropertyTitleAndDescription\getLongDescription(), ilObjectPropertyTitleAndDescription\getTitle(), updateMetadataForTitleAndDescription(), and withPropertyTitleAndDescription().

85  : void {
86  $this->core_properties = $this->core_properties_repository->store(
87  $this->core_properties
88  ->withPropertyTitleAndDescription($property_title_and_description)
89  );
91  $property_title_and_description->getTitle(),
92  $property_title_and_description->getLongDescription()
93  );
94  }
withPropertyTitleAndDescription(ilObjectPropertyTitleAndDescription $property_title_and_description)
updateMetadataForTitleAndDescription(string $title, string $description)
+ Here is the call graph for this function:

◆ storePropertyTitleAndIconVisibility()

ilObjectProperties::storePropertyTitleAndIconVisibility ( ilObjectPropertyTitleAndIconVisibility  $property_title_and_icon_visibility)

Definition at line 122 of file class.ilObjectProperties.php.

124  : void {
125  $this->additional_properties = $this->additional_properties_repository->store(
126  $this->additional_properties
127  ->withPropertyTitleAndIconVisibility($property_title_and_icon_visibility)
128  );
129  }

◆ updateMetadataForTitleAndDescription()

ilObjectProperties::updateMetadataForTitleAndDescription ( string  $title,
string  $description 
)
private

Definition at line 187 of file class.ilObjectProperties.php.

Referenced by storeCoreProperties(), and storePropertyTitleAndDescription().

190  : void {
191  $paths = $this->lom_services->paths();
192  $obj_id = $this->core_properties->getObjectId();
193  $type = $this->core_properties->getType();
194 
195  /*
196  * This is a hacky solution to distinguish between
197  * objects with LOM support and without. In the future, proper
198  * infrastructure to make that distinction should be added.
199  */
200  $title_data = $this->lom_services->read($obj_id, 0, $type, $paths->title())
201  ->firstData($paths->title());
202  if ($title_data->type() === LOMType::NULL) {
203  return;
204  }
205 
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);
210  } else {
211  $manipulator = $manipulator->prepareDelete($paths->firstDescription());
212  }
213  $manipulator->execute();
214  }
+ Here is the caller graph for this function:

◆ withImportId()

ilObjectProperties::withImportId ( string  $import_id)

Definition at line 62 of file class.ilObjectProperties.php.

62  : self
63  {
64  $clone = clone $this;
65  $clone->core_properties = $this->core_properties->withImportId($import_id);
66  return $clone;
67  }

◆ withOwner()

ilObjectProperties::withOwner ( int  $owner)

Definition at line 50 of file class.ilObjectProperties.php.

50  : self
51  {
52  $clone = clone $this;
53  $clone->core_properties = $this->core_properties->withOwner($owner);
54  return $clone;
55  }

◆ withPropertyIsOnline()

ilObjectProperties::withPropertyIsOnline ( ilObjectPropertyIsOnline  $property_is_online)

Definition at line 108 of file class.ilObjectProperties.php.

110  : self {
111  $clone = clone $this;
112  $clone->core_properties = $this->core_properties
113  ->withPropertyIsOnline($property_is_online);
114  return $clone;
115  }

◆ withPropertyTitleAndDescription()

ilObjectProperties::withPropertyTitleAndDescription ( ilObjectPropertyTitleAndDescription  $property_title_and_description)

Definition at line 74 of file class.ilObjectProperties.php.

Referenced by storePropertyTitleAndDescription().

76  : self {
77  $clone = clone $this;
78  $clone->core_properties = $this->core_properties
79  ->withPropertyTitleAndDescription($property_title_and_description);
80  return $clone;
81  }
+ Here is the caller graph for this function:

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