5 include_once(
"Services/Table/classes/class.ilTable2GUI.php");
21 function __construct($a_parent_obj, $a_parent_cmd, $a_media_object)
26 $this->media_object = $a_media_object;
29 $this->
addColumn($this->lng->txt(
"cont_name"),
"title",
"");
30 $this->
addColumn($this->lng->txt(
"cont_shape"),
"",
"");
31 $this->
addColumn($this->lng->txt(
"cont_coords"),
"",
"");
32 $this->
addColumn($this->lng->txt(
"cont_link"),
"",
"");
35 $this->
setRowTemplate(
"tpl.image_map_table_row.html",
"Services/MediaObjects");
41 $this->
addMultiCommand(
"editShapeWholePicture", $lng->txt(
"cont_edit_shape_whole_picture"));
42 $this->
addMultiCommand(
"editShapeRectangle", $lng->txt(
"cont_edit_shape_rectangle"));
43 $this->
addMultiCommand(
"editShapeCircle", $lng->txt(
"cont_edit_shape_circle"));
44 $this->
addMultiCommand(
"editShapePolygon", $lng->txt(
"cont_edit_shape_polygon"));
49 $this->
addCommandButton(
"updateAreas", $this->lng->txt(
"cont_update_names"));
52 $this->
addCommandButton(
"linkWholePicture", $this->lng->txt(
"cont_link_whole_picture"));
53 $this->
addCommandButton(
"addRectangle", $this->lng->txt(
"cont_add_rectangle"));
66 $st_item =& $this->media_object->getMediaItem(
"Standard");
70 include_once(
"./Services/MediaObjects/classes/class.ilMapArea.php");
71 for ($i=1; $i<=$max; $i++)
73 $area =
new ilMapArea($st_item->getId(), $i);
74 $areas[] = array(
"nr" => $i,
"area" => $area,
"title" => $area->getTitle());
88 $area = $a_set[
"area"];
90 $this->tpl->setVariable(
"CHECKBOX",
91 ilUtil::formCheckBox(
"",
"area[]", $i));
92 $this->tpl->setVariable(
"VAR_NAME",
"name_".$i);
93 $this->tpl->setVariable(
"VAL_NAME", $area->getTitle());
94 $this->tpl->setVariable(
"VAL_SHAPE", $area->getShape());
95 $this->tpl->setVariable(
"VAL_COORDS",
96 implode(explode(
",", $area->getCoords()),
", "));
97 switch ($area->getLinkType())
100 $this->tpl->setVariable(
"VAL_LINK", $area->getHRef());
104 $link_str = $this->parent_obj->getMapAreaLinkString($area->getTarget(),
105 $area->getType(), $area->getTargetFrame());
106 $this->tpl->setVariable(
"VAL_LINK", $link_str);