ILIAS  trunk Revision v13.0_alpha-62-g3b72d83f2e5
ilPCImageMapEditorGUI Class Reference

User interface class for page content map editor. More...

+ Inheritance diagram for ilPCImageMapEditorGUI:
+ Collaboration diagram for ilPCImageMapEditorGUI:

Public Member Functions

 __construct ( $a_content_obj, ilPageObject $a_page, EditGUIRequest $request)
 
 getParentNodeName ()
 
 getImageMapTableHTML ()
 
 editTitle (int $area_nr)
 
 saveTitle ()
 
 editHighlightMode (int $area_nr)
 
 saveHighlightMode ()
 
 editHighlightClass (int $area_nr)
 
 saveHighlightClass ()
 
 saveArea ()
 Save new or updated map area. More...
 
 deleteAreas (int $area_nr=0)
 Delete map areas. More...
 
 getLinkTypeOfArea (int $a_nr)
 Get Link Type of Area. More...
 
 getTypeOfArea (int $a_nr)
 Get Type of Area (only internal link) More...
 
 getTargetOfArea (int $a_nr)
 Get Target of Area (only internal link) More...
 
 getTargetFrameOfArea (int $a_nr)
 Get TargetFrame of Area (only internal link) More...
 
 getHrefOfArea (int $a_nr)
 Get Href of Area (only external link) More...
 
 updateAreas ()
 Update map areas. More...
 
 makeMapWorkCopy (string $a_edit_property="", int $a_area_nr=0, bool $a_output_new_area=false, string $a_area_type="", string $a_coords="")
 Make work file for editing. More...
 
 getAliasXML ()
 
- Public Member Functions inherited from ilImageMapEditorGUI
 __construct (ilObjMediaObject $a_media_object)
 
 executeCommand ()
 
 editMapAreas ()
 
 getToolbar ()
 
 getEditorTitle ()
 
 getImageMapTableHTML ()
 
 editTitle (int $area_nr)
 
 saveTitle ()
 
 editHighlightMode (int $area_nr)
 
 saveHighlightMode ()
 
 editHighlightClass (int $area_nr)
 
 saveHighlightClass ()
 
 handleMapParameters ()
 
 showImageMap ()
 
 updateAreas ()
 
 addNewArea ()
 
 linkWholePicture ()
 
 addRectangle ()
 
 addCircle ()
 
 addPolygon ()
 
 clearSessionVars ()
 
 addArea (bool $a_handle=true)
 
 editMapArea (bool $a_get_next_coordinate=false, bool $a_output_new_area=false, bool $a_save_form=false, string $a_edit_property="", int $a_area_nr=0)
 Edit a single map area. More...
 
 initAreaEditingForm (string $a_edit_property)
 
 makeMapWorkCopy (string $a_edit_property="", int $a_area_nr=0, bool $a_output_new_area=false, string $a_area_type="", string $a_coords="")
 Make work file for editing. More...
 
 getImageMapOutput (string $a_map_edit_mode="")
 Render the image map. More...
 
 getAdditionalPageXML ()
 Get additional page xml (to be overwritten) More...
 
 outputPostProcessing (string $a_output)
 
 getAliasXML ()
 
 getMapAreaLinkString (string $a_target, string $a_type, string $a_frame)
 Get text name of internal link. More...
 
 editImagemapForward ()
 Get image map coordinates. More...
 
 saveArea ()
 Save new or updated map area. More...
 
 setInternalLink ()
 
 setLink (bool $a_handle=true)
 
 getLinkTypeOfArea (int $a_nr)
 
 getTypeOfArea (int $a_nr)
 Get Type of Area (only internal link) More...
 
 getTargetOfArea (int $a_nr)
 Get Target of Area (only internal link) More...
 
 getTargetFrameOfArea (int $a_nr)
 Get TargetFrame of Area (only internal link) More...
 
 getHrefOfArea (int $a_nr)
 Get Href of Area (only external link) More...
 
 deleteAreas (int $area_nr=0)
 Delete map areas. More...
 
 editLink (int $area_nr=0)
 Edit existing link. More...
 
 editShapeWholePicture (int $area_nr=0)
 Edit an existing shape (make it a whole picture link) More...
 
 editShapeRectangle (int $area_nr=0)
 Edit an existing shape (make it a rectangle) More...
 
 editShapeCircle (int $area_nr=0)
 Edit an existing shape (make it a circle) More...
 
 editShapePolygon (int $area_nr=0)
 Edit an existing shape (make it a polygon) More...
 
 setShape (bool $a_handle=true)
 edit shape of existing map area More...
 
 setHighlight ()
 Set highlight settings. More...
 

Protected Member Functions

 getAliasMapArea (int $area_nr)
 
 getAliasAreaTitleForm (int $area_nr)
 
 getAliasAreaHighlightForm (int $area_nr, string $field, string $label, string $cmd, array $options, string $value)
 
- Protected Member Functions inherited from ilImageMapEditorGUI
 getImageMapTable ()
 
 getMapArea (int $area_nr)
 
 getAreaTitleForm (int $area_nr, string $cmd="saveTitle")
 
 getAreaHighlightForm (int $area_nr, string $field, string $label, string $cmd, array $options, string $value)
 

Protected Attributes

MapEditorSessionRepository $map_repo
 
ilMediaAliasItem $std_alias_item
 
ilPageObject $page
 
ilPCInteractiveImage ilPCMediaObject $content_obj
 
EditGUIRequest $edit_request
 
ILIAS COPage InternalGUIService $copage_gui
 
- Protected Attributes inherited from ilImageMapEditorGUI
ILIAS COPage Xsl XslManager $xsl
 
ilObjectDefinition $obj_definition
 
ilObjMediaObject $media_object
 
ImageMapGUIRequest $request
 
ImageMapManager $map
 
ilTemplate $tpl
 
ilGlobalTemplateInterface $main_tpl
 
ilCtrl $ctrl
 
ilLanguage $lng
 
ilToolbarGUI $toolbar
 
ILIAS MediaObjects InternalGUIService $media_gui
 

Additional Inherited Members

- Static Public Member Functions inherited from ilImageMapEditorGUI
static _recoverParameters ()
 Recover parameters from session variables (static) More...
 

Detailed Description

User interface class for page content map editor.

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de @ilCtrl_Calls ilPCImageMapEditorGUI: ilInternalLinkGUI

Definition at line 29 of file class.ilPCImageMapEditorGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilPCImageMapEditorGUI::__construct (   $a_content_obj,
ilPageObject  $a_page,
EditGUIRequest  $request 
)
Parameters
ilPCMediaObject | ilPCInteractiveImage$a_content_obj

Definition at line 41 of file class.ilPCImageMapEditorGUI.php.

45 {
46 global $DIC;
47
48 $this->content_obj = $a_content_obj;
49 $this->page = $a_page;
50 $this->edit_request = $request;
51 $this->copage_gui = $DIC->copage()->internal()->gui();
52 parent::__construct($a_content_obj->getMediaObject());
53
54 $this->std_alias_item = new ilMediaAliasItem(
55 $this->content_obj->getDomDoc(),
56 $this->content_obj->hier_id,
57 "Standard",
58 $this->content_obj->getPCId(),
59 $this->getParentNodeName()
60 );
61 $this->map_repo = $DIC
62 ->copage()
63 ->internal()
64 ->repo()
65 ->pc()
66 ->mediaMap();
67 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26

References $DIC, ilImageMapEditorGUI\$request, and ILIAS\GlobalScreen\Provider\__construct().

+ Here is the call graph for this function:

Member Function Documentation

◆ deleteAreas()

ilPCImageMapEditorGUI::deleteAreas ( int  $area_nr = 0)

Delete map areas.

Reimplemented from ilImageMapEditorGUI.

Definition at line 328 of file class.ilPCImageMapEditorGUI.php.

328 : void
329 {
330 $ilCtrl = $this->ctrl;
332
333 if ($area_nr === 0) {
334 $area_nr = $this->request->getAreaNr();
335 }
336
337 if ($area_nr > 0) {
338 $this->std_alias_item->deleteMapArea($area_nr);
339 $this->page->update();
340 $this->main_tpl->setOnScreenMessage('success', $lng->txt("cont_areas_deleted"), true);
341 $ilCtrl->redirect($this, "editMapAreas");
342 return;
343 }
344
345 $areas = $this->edit_request->getStringArray("area");
346 if (count($areas) == 0) {
347 $this->main_tpl->setOnScreenMessage('failure', $lng->txt("no_checkbox"), true);
348 $ilCtrl->redirect($this, "editMapAreas");
349 }
350
351 // $std_alias_item = new ilMediaAliasItem($this->content_obj->dom,
352 // $this->content_obj->hier_id, "Standard", $this->content_obj->getPcId());
353
354 $i = 0;
355 arsort($areas);
356 foreach ($areas as $area_nr) {
357 $this->std_alias_item->deleteMapArea($area_nr);
358 }
359 $this->page->update();
360 $this->main_tpl->setOnScreenMessage('success', $lng->txt("cont_areas_deleted"), true);
361
362 $ilCtrl->redirect($this, "editMapAreas");
363 }
txt(string|LanguageIdentifier $a_topic, ?int $n=null)
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...

References $lng.

◆ editHighlightClass()

ilPCImageMapEditorGUI::editHighlightClass ( int  $area_nr)

Reimplemented from ilImageMapEditorGUI.

Definition at line 191 of file class.ilPCImageMapEditorGUI.php.

191 : void
192 {
193 $this->media_gui->clearAsnyOnloadCode();
194 $area = $this->getAliasMapArea($area_nr);
195 $modal = $this->media_gui
196 ->modal($this->lng->txt("cont_highlight_class"))
197 ->form($this->getAliasAreaHighlightForm(
198 $area_nr,
199 "highlight_class",
200 "cont_highlight_class",
201 "saveHighlightClass",
203 $area["HighlightClass"] ?? ""
204 ));
205 $modal->send();
206 }
static getAllHighlightClasses()
getAliasAreaHighlightForm(int $area_nr, string $field, string $label, string $cmd, array $options, string $value)

References ilMapArea\getAllHighlightClasses(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ editHighlightMode()

ilPCImageMapEditorGUI::editHighlightMode ( int  $area_nr)

Reimplemented from ilImageMapEditorGUI.

Definition at line 151 of file class.ilPCImageMapEditorGUI.php.

151 : void
152 {
153 $this->media_gui->clearAsnyOnloadCode();
154 $area = $this->getAliasMapArea($area_nr);
155 $modal = $this->media_gui
156 ->modal($this->lng->txt("cont_highlight_mode"))
157 ->form($this->getAliasAreaHighlightForm(
158 $area_nr,
159 "highlight_mode",
160 "cont_highlight_mode",
161 "saveHighlightMode",
163 $area["HighlightMode"] ?? ""
164 ));
165 $modal->send();
166 }
static getAllHighlightModes()

References ilMapArea\getAllHighlightModes(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ editTitle()

ilPCImageMapEditorGUI::editTitle ( int  $area_nr)

Reimplemented from ilImageMapEditorGUI.

Definition at line 112 of file class.ilPCImageMapEditorGUI.php.

112 : void
113 {
114 $this->media_gui->clearAsnyOnloadCode();
115 $modal = $this->media_gui
116 ->modal($this->lng->txt("cont_name"))
117 ->form($this->getAliasAreaTitleForm($area_nr));
118 $modal->send();
119 }

References getAliasAreaTitleForm(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ getAliasAreaHighlightForm()

ilPCImageMapEditorGUI::getAliasAreaHighlightForm ( int  $area_nr,
string  $field,
string  $label,
string  $cmd,
array  $options,
string  $value 
)
protected

Definition at line 137 of file class.ilPCImageMapEditorGUI.php.

145 $this->ctrl->setParameterByClass(self::class, "area_nr", $area_nr);
146 return $this->media_gui
147 ->form([self::class], $cmd)
148 ->select($field, $this->lng->txt($label), $options, "", $value);
149 }

◆ getAliasAreaTitleForm()

ilPCImageMapEditorGUI::getAliasAreaTitleForm ( int  $area_nr)
protected

Definition at line 98 of file class.ilPCImageMapEditorGUI.php.

99 {
100 $this->ctrl->setParameterByClass(self::class, "area_nr", $area_nr);
101 return $this->media_gui
102 ->form([self::class], "saveTitle")
103 ->text(
104 "title",
105 $this->lng->txt("cont_name"),
106 "",
107 $this->getAliasMapArea($area_nr)["Link"]["Title"] ?? "",
108 200
109 );
110 }

References ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

Referenced by editTitle(), and saveTitle().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getAliasMapArea()

ilPCImageMapEditorGUI::getAliasMapArea ( int  $area_nr)
protected

Definition at line 88 of file class.ilPCImageMapEditorGUI.php.

88 : array
89 {
90 foreach ($this->std_alias_item->getMapAreas() as $area) {
91 if ((int) $area["Nr"] === $area_nr) {
92 return $area;
93 }
94 }
95 return [];
96 }

◆ getAliasXML()

ilPCImageMapEditorGUI::getAliasXML ( )

Reimplemented from ilImageMapEditorGUI.

Definition at line 493 of file class.ilPCImageMapEditorGUI.php.

493 : string
494 {
495 return $this->content_obj->dumpXML();
496 }

◆ getHrefOfArea()

ilPCImageMapEditorGUI::getHrefOfArea ( int  $a_nr)

Get Href of Area (only external link)

Reimplemented from ilImageMapEditorGUI.

Definition at line 400 of file class.ilPCImageMapEditorGUI.php.

400 : string
401 {
402 return $this->std_alias_item->getHrefOfArea($a_nr);
403 }

◆ getImageMapTableHTML()

ilPCImageMapEditorGUI::getImageMapTableHTML ( )

Reimplemented from ilImageMapEditorGUI.

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

74 : string
75 {
76 $table = $this->copage_gui->pc()->imageMapTableBuilder(
77 $this->content_obj,
78 $this->getParentNodeName(),
79 $this,
80 "editMapAreas"
81 )->getTable();
82 if ($table->handleCommand()) {
83 return "";
84 }
85 return $table->render();
86 }

References getParentNodeName().

+ Here is the call graph for this function:

◆ getLinkTypeOfArea()

ilPCImageMapEditorGUI::getLinkTypeOfArea ( int  $a_nr)

Get Link Type of Area.

Reimplemented from ilImageMapEditorGUI.

Definition at line 368 of file class.ilPCImageMapEditorGUI.php.

368 : string
369 {
370 return $this->std_alias_item->getLinkTypeOfArea($a_nr);
371 }

◆ getParentNodeName()

ilPCImageMapEditorGUI::getParentNodeName ( )

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

69 : string
70 {
71 return "MediaObject";
72 }

Referenced by getImageMapTableHTML().

+ Here is the caller graph for this function:

◆ getTargetFrameOfArea()

ilPCImageMapEditorGUI::getTargetFrameOfArea ( int  $a_nr)

Get TargetFrame of Area (only internal link)

Reimplemented from ilImageMapEditorGUI.

Definition at line 392 of file class.ilPCImageMapEditorGUI.php.

392 : string
393 {
394 return $this->std_alias_item->getTargetFrameOfArea($a_nr);
395 }

◆ getTargetOfArea()

ilPCImageMapEditorGUI::getTargetOfArea ( int  $a_nr)

Get Target of Area (only internal link)

Reimplemented from ilImageMapEditorGUI.

Definition at line 384 of file class.ilPCImageMapEditorGUI.php.

384 : string
385 {
386 return $this->std_alias_item->getTargetOfArea($a_nr);
387 }

◆ getTypeOfArea()

ilPCImageMapEditorGUI::getTypeOfArea ( int  $a_nr)

Get Type of Area (only internal link)

Reimplemented from ilImageMapEditorGUI.

Definition at line 376 of file class.ilPCImageMapEditorGUI.php.

376 : string
377 {
378 return $this->std_alias_item->getTypeOfArea($a_nr);
379 }

◆ makeMapWorkCopy()

ilPCImageMapEditorGUI::makeMapWorkCopy ( string  $a_edit_property = "",
int  $a_area_nr = 0,
bool  $a_output_new_area = false,
string  $a_area_type = "",
string  $a_coords = "" 
)

Make work file for editing.

Reimplemented from ilImageMapEditorGUI.

Definition at line 449 of file class.ilPCImageMapEditorGUI.php.

455 : ilMediaItem {
456 // old for pc media object
457 // $media_object = $this->media_object->getMediaItem("Standard");
458 $media_object = $this->content_obj->getMediaObject();
459
460 // create/update imagemap work copy
461 $st_item = $media_object->getMediaItem("Standard");
462 $st_alias_item = new ilMediaAliasItem(
463 $this->content_obj->getDomDoc(),
464 $this->content_obj->hier_id,
465 "Standard",
466 $this->content_obj->getPCId(),
467 $this->getParentNodeName()
468 );
469
470 if ($a_edit_property == "shape") {
471 $st_alias_item->makeMapWorkCopy(
472 $st_item,
473 $a_area_nr,
474 true,
475 $a_output_new_area,
476 $a_area_type,
477 $a_coords
478 ); // exclude area currently being edited
479 } else {
480 $st_alias_item->makeMapWorkCopy(
481 $st_item,
482 $a_area_nr,
483 false,
484 $a_output_new_area,
485 $a_area_type,
486 $a_coords
487 );
488 }
489
490 return $st_item;
491 }
Class ilMediaItem Media Item, component of a media object (file or reference)
getMediaItem(string $a_purpose)
get item for media purpose

◆ saveArea()

ilPCImageMapEditorGUI::saveArea ( )

Save new or updated map area.

Reimplemented from ilImageMapEditorGUI.

Definition at line 234 of file class.ilPCImageMapEditorGUI.php.

234 : string
235 {
237 $ilCtrl = $this->ctrl;
238
239 switch ($this->map->getMode()) {
240 // save edited link
241 case "edit_link":
242 // $std_alias_item = new ilMediaAliasItem($this->content_obj->dom,
243 // $this->content_obj->hier_id, "Standard", $this->content_obj->getPcId());
244
245 $area_link_type = $this->edit_request->getString("area_link_type");
246 if ($area_link_type == IL_INT_LINK) {
247 $int_link = $this->map->getInternalLink();
248 $this->std_alias_item->setAreaIntLink(
249 $this->map->getAreaNr(),
250 $int_link["type"],
251 $int_link["target"],
252 $int_link["target_frame"]
253 );
254 } elseif ($area_link_type == IL_NO_LINK) {
255 $this->std_alias_item->setAreaExtLink(
256 $this->map->getAreaNr(),
257 ""
258 );
259 } else {
260 $this->std_alias_item->setAreaExtLink(
261 $this->map->getAreaNr(),
262 $this->edit_request->getString("area_link_ext")
263 );
264 }
265 $this->page->update();
266 break;
267
268 // save edited shape
269 case "edit_shape":
270 $this->std_alias_item->setShape(
271 $this->map->getAreaNr(),
272 $this->map->getAreaType(),
273 $this->map->getCoords()
274 );
275 $this->page->update();
276 break;
277
278 // save new area
279 default:
280 $area_type = $this->map->getAreaType();
281 $coords = $this->map->getCoords();
282 $link = [];
283 $area_link_type = $this->edit_request->getString("area_link_type");
284 switch ($area_link_type) {
285 case IL_EXT_LINK:
286 $link = array(
287 "LinkType" => IL_EXT_LINK,
288 "Href" => $this->edit_request->getString("area_link_ext"));
289 break;
290
291 case IL_NO_LINK:
292 $link = array(
293 "LinkType" => IL_EXT_LINK,
294 "Href" => "");
295 break;
296
297 case IL_INT_LINK:
298 $int_link = $this->map->getInternalLink();
299 $link = array(
300 "LinkType" => IL_INT_LINK,
301 "Type" => $int_link["type"],
302 "Target" => $int_link["target"],
303 "TargetFrame" => $int_link["target_frame"]);
304 break;
305 }
306
307 // $std_alias_item = new ilMediaAliasItem($this->content_obj->dom,
308 // $this->content_obj->hier_id, "Standard", $this->content_obj->getPcId());
309 $this->std_alias_item->addMapArea(
310 $area_type,
311 $coords,
312 $this->edit_request->getString("area_name"),
313 $link
314 );
315 $this->page->update();
316 break;
317 }
318
319 //$this->initMapParameters();
320 $this->main_tpl->setOnScreenMessage('success', $lng->txt("cont_saved_map_area"), true);
321 $ilCtrl->redirect($this, "editMapAreas");
322 return "";
323 }
const IL_INT_LINK
const IL_EXT_LINK
const IL_NO_LINK

References $lng, IL_EXT_LINK, IL_INT_LINK, and IL_NO_LINK.

◆ saveHighlightClass()

ilPCImageMapEditorGUI::saveHighlightClass ( )

Reimplemented from ilImageMapEditorGUI.

Definition at line 208 of file class.ilPCImageMapEditorGUI.php.

208 : void
209 {
210 $area_nr = $this->request->getAreaNr();
211 $area = $this->getAliasMapArea($area_nr);
212 $form = $this->getAliasAreaHighlightForm(
213 $area_nr,
214 "highlight_class",
215 "cont_highlight_class",
216 "saveHighlightClass",
218 $area["HighlightClass"] ?? ""
219 );
220 if ($form->isValid()) {
221 $this->std_alias_item->setAreaHighlightClass(
222 $area_nr,
223 (string) $form->getData("highlight_class")
224 );
225 $this->page->update();
226 }
227 $this->main_tpl->setOnScreenMessage("success", $this->lng->txt("msg_obj_modified"), true);
228 $this->ctrl->redirect($this, "editMapAreas");
229 }

References ILIAS\Repository\ctrl(), ilMapArea\getAllHighlightClasses(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ saveHighlightMode()

ilPCImageMapEditorGUI::saveHighlightMode ( )

Reimplemented from ilImageMapEditorGUI.

Definition at line 168 of file class.ilPCImageMapEditorGUI.php.

168 : void
169 {
170 $area_nr = $this->request->getAreaNr();
171 $area = $this->getAliasMapArea($area_nr);
172 $form = $this->getAliasAreaHighlightForm(
173 $area_nr,
174 "highlight_mode",
175 "cont_highlight_mode",
176 "saveHighlightMode",
178 $area["HighlightMode"] ?? ""
179 );
180 if ($form->isValid()) {
181 $this->std_alias_item->setAreaHighlightMode(
182 $area_nr,
183 (string) $form->getData("highlight_mode")
184 );
185 $this->page->update();
186 }
187 $this->main_tpl->setOnScreenMessage("success", $this->lng->txt("msg_obj_modified"), true);
188 $this->ctrl->redirect($this, "editMapAreas");
189 }

References ILIAS\Repository\ctrl(), ilMapArea\getAllHighlightModes(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ saveTitle()

ilPCImageMapEditorGUI::saveTitle ( )

Reimplemented from ilImageMapEditorGUI.

Definition at line 121 of file class.ilPCImageMapEditorGUI.php.

121 : void
122 {
123 $area_nr = $this->request->getAreaNr();
124 $form = $this->getAliasAreaTitleForm($area_nr);
125 if ($form->isValid()) {
126 $title = $form->getData("title");
127 $this->std_alias_item->setAreaTitle(
128 $area_nr,
129 $title === "" ? " " : (string) $title
130 );
131 $this->page->update();
132 }
133 $this->main_tpl->setOnScreenMessage("success", $this->lng->txt("msg_obj_modified"), true);
134 $this->ctrl->redirect($this, "editMapAreas");
135 }

References ILIAS\Repository\ctrl(), getAliasAreaTitleForm(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ updateAreas()

ilPCImageMapEditorGUI::updateAreas ( )

Update map areas.

Reimplemented from ilImageMapEditorGUI.

Definition at line 408 of file class.ilPCImageMapEditorGUI.php.

408 : void
409 {
411 $ilCtrl = $this->ctrl;
412
413 // $std_alias_item = new ilMediaAliasItem($this->content_obj->dom,
414 // $this->content_obj->hier_id, "Standard", $this->content_obj->getPcId());
415 $areas = $this->std_alias_item->getMapAreas();
416 foreach ($areas as $area) {
417 if (!$this->edit_request->has("name_" . $area["Nr"])) {
418 continue;
419 }
420 // fix #26032 empty values lead to "empty text node" errors on page update
421 $name = $this->edit_request->getString("name_" . $area["Nr"]);
422 $hl_mode = $this->edit_request->getString("hl_mode_" . $area["Nr"]);
423 $hl_class = $this->edit_request->getString("hl_class_" . $area["Nr"]);
424 if ($name == "") {
425 $name = " ";
426 }
427 $this->std_alias_item->setAreaTitle(
428 $area["Nr"],
429 $name
430 );
431 $this->std_alias_item->setAreaHighlightMode(
432 $area["Nr"],
433 $hl_mode
434 );
435 $this->std_alias_item->setAreaHighlightClass(
436 $area["Nr"],
437 $hl_class
438 );
439 }
440 $this->page->update();
441
442 $this->main_tpl->setOnScreenMessage('success', $lng->txt("cont_saved_map_data"), true);
443 $ilCtrl->redirect($this, "editMapAreas");
444 }
redirect(object $a_gui_obj, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false)
@inheritDoc

References $lng.

Field Documentation

◆ $content_obj

ilPCInteractiveImage ilPCMediaObject ilPCImageMapEditorGUI::$content_obj
protected

Definition at line 34 of file class.ilPCImageMapEditorGUI.php.

◆ $copage_gui

ILIAS COPage InternalGUIService ilPCImageMapEditorGUI::$copage_gui
protected

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

◆ $edit_request

EditGUIRequest ilPCImageMapEditorGUI::$edit_request
protected

Definition at line 35 of file class.ilPCImageMapEditorGUI.php.

◆ $map_repo

MapEditorSessionRepository ilPCImageMapEditorGUI::$map_repo
protected

Definition at line 31 of file class.ilPCImageMapEditorGUI.php.

◆ $page

ilPageObject ilPCImageMapEditorGUI::$page
protected

Definition at line 33 of file class.ilPCImageMapEditorGUI.php.

◆ $std_alias_item

ilMediaAliasItem ilPCImageMapEditorGUI::$std_alias_item
protected

Definition at line 32 of file class.ilPCImageMapEditorGUI.php.


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