46 $this->content_obj = $a_content_obj;
47 $this->page = $a_page;
52 $this->content_obj->getDomDoc(),
53 $this->content_obj->hier_id,
55 $this->content_obj->getPCId(),
56 $this->getParentNodeName()
58 $this->map_repo =
$DIC
79 return $image_map_table->getHTML();
90 switch ($this->map->getMode()) {
96 $area_link_type = $this->edit_request->getString(
"area_link_type");
98 $int_link = $this->map->getInternalLink();
99 $this->std_alias_item->setAreaIntLink(
100 $this->map->getAreaNr(),
103 $int_link[
"target_frame"]
106 $this->std_alias_item->setAreaExtLink(
107 $this->map->getAreaNr(),
111 $this->std_alias_item->setAreaExtLink(
112 $this->map->getAreaNr(),
113 $this->edit_request->getString(
"area_link_ext")
116 $this->page->update();
121 $this->std_alias_item->setShape(
122 $this->map->getAreaNr(),
123 $this->map->getAreaType(),
124 $this->map->getCoords()
126 $this->page->update();
131 $area_type = $this->map->getAreaType();
132 $coords = $this->map->getCoords();
134 $area_link_type = $this->edit_request->getString(
"area_link_type");
135 switch ($area_link_type) {
139 "Href" => $this->edit_request->getString(
"area_link_ext"));
149 $int_link = $this->map->getInternalLink();
152 "Type" => $int_link[
"type"],
153 "Target" => $int_link[
"target"],
154 "TargetFrame" => $int_link[
"target_frame"]);
160 $this->std_alias_item->addMapArea(
163 $this->edit_request->getString(
"area_name"),
166 $this->page->update();
171 $this->main_tpl->setOnScreenMessage(
'success',
$lng->
txt(
"cont_saved_map_area"),
true);
172 $ilCtrl->redirect($this,
"editMapAreas");
184 $areas = $this->edit_request->getStringArray(
"area");
185 if (count($areas) == 0) {
186 $this->main_tpl->setOnScreenMessage(
'failure',
$lng->
txt(
"no_checkbox"),
true);
187 $ilCtrl->redirect($this,
"editMapAreas");
195 foreach ($areas as $area_nr) {
196 $this->std_alias_item->deleteMapArea($area_nr);
198 $this->page->update();
199 $this->main_tpl->setOnScreenMessage(
'success',
$lng->
txt(
"cont_areas_deleted"),
true);
201 $ilCtrl->redirect($this,
"editMapAreas");
209 return $this->std_alias_item->getLinkTypeOfArea($a_nr);
217 return $this->std_alias_item->getTypeOfArea($a_nr);
225 return $this->std_alias_item->getTargetOfArea($a_nr);
233 return $this->std_alias_item->getTargetFrameOfArea($a_nr);
241 return $this->std_alias_item->getHrefOfArea($a_nr);
254 $areas = $this->std_alias_item->getMapAreas();
255 foreach ($areas as $area) {
257 $name = $this->edit_request->getString(
"name_" . $area[
"Nr"]);
258 $hl_mode = $this->edit_request->getString(
"hl_mode_" . $area[
"Nr"]);
259 $hl_class = $this->edit_request->getString(
"hl_class_" . $area[
"Nr"]);
263 $this->std_alias_item->setAreaTitle(
267 $this->std_alias_item->setAreaHighlightMode(
271 $this->std_alias_item->setAreaHighlightClass(
276 $this->page->update();
278 $this->main_tpl->setOnScreenMessage(
'success',
$lng->
txt(
"cont_saved_map_data"),
true);
279 $ilCtrl->
redirect($this,
"editMapAreas");
286 string $a_edit_property =
"",
288 bool $a_output_new_area =
false,
289 string $a_area_type =
"",
290 string $a_coords =
""
299 $this->content_obj->getDomDoc(),
300 $this->content_obj->hier_id,
302 $this->content_obj->getPCId(),
303 $this->getParentNodeName()
306 if ($a_edit_property ==
"shape") {
307 $st_alias_item->makeMapWorkCopy(
316 $st_alias_item->makeMapWorkCopy(
331 return $this->content_obj->dumpXML();
Page component editing request.
Editing session repository.
redirect(object $a_gui_obj, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false)
@inheritDoc
User interface class for map editor.
ilObjMediaObject $media_object
ImageMapGUIRequest $request
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
User interface class for page content map editor.
saveArea()
Save new or updated map area.
deleteAreas()
Delete map areas.
ilMediaAliasItem $std_alias_item
EditGUIRequest $edit_request
MapEditorSessionRepository $map_repo
getHrefOfArea(int $a_nr)
Get Href of Area (only external link)
__construct( $a_content_obj, ilPageObject $a_page, EditGUIRequest $request)
getTargetFrameOfArea(int $a_nr)
Get TargetFrame of Area (only internal link)
getLinkTypeOfArea(int $a_nr)
Get Link Type of Area.
ilPCInteractiveImage ilPCMediaObject $content_obj
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.
getTypeOfArea(int $a_nr)
Get Type of Area (only internal link)
updateAreas()
Update map areas.
getTargetOfArea(int $a_nr)
Get Target of Area (only internal link)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ilPageObject Handles PageObjects of ILIAS Learning Modules (see ILIAS DTD)
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc