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;
28 include_once(
"./Services/MediaObjects/classes/class.ilMapArea.php");
35 $this->
setRowTemplate(
"tpl.image_map_table_row.html",
"Services/MediaObjects");
52 $this->
addColumn($this->lng->txt(
"cont_name"),
"title",
"");
53 $this->
addColumn($this->lng->txt(
"cont_shape"),
"",
"");
54 $this->
addColumn($this->lng->txt(
"cont_coords"),
"",
"");
55 $this->
addColumn($this->lng->txt(
"cont_highlight_mode"));
56 $this->
addColumn($this->lng->txt(
"cont_highlight_class"));
57 $this->
addColumn($this->lng->txt(
"cont_link"),
"",
"");
70 $this->
addMultiCommand(
"editShapeWholePicture", $lng->txt(
"cont_edit_shape_whole_picture"));
71 $this->
addMultiCommand(
"editShapeRectangle", $lng->txt(
"cont_edit_shape_rectangle"));
72 $this->
addMultiCommand(
"editShapeCircle", $lng->txt(
"cont_edit_shape_circle"));
73 $this->
addMultiCommand(
"editShapePolygon", $lng->txt(
"cont_edit_shape_polygon"));
88 $st_item =& $this->media_object->getMediaItem(
"Standard");
92 include_once(
"./Services/MediaObjects/classes/class.ilMapArea.php");
93 for ($i=1; $i<=$max; $i++)
95 $area =
new ilMapArea($st_item->getId(), $i);
96 $areas[] = array(
"nr" => $i,
"area" => $area,
"title" => $area->getTitle());
110 $area = $a_set[
"area"];
112 $this->tpl->setVariable(
"CHECKBOX",
113 ilUtil::formCheckBox(
"",
"area[]", $i));
114 $this->tpl->setVariable(
"VAR_NAME",
"name_".$i);
116 $this->tpl->setVariable(
"VAL_SHAPE", $area->getShape());
118 $this->tpl->setVariable(
"VAL_HIGHL_MODE",
120 $this->highl_modes,
false,
true));
121 $this->tpl->setVariable(
"VAL_HIGHL_CLASS",
123 $this->highl_classes,
false,
true));
125 $this->tpl->setVariable(
"VAL_COORDS",
126 implode(explode(
",", $area->getCoords()),
", "));
127 switch ($area->getLinkType())
130 $this->tpl->setVariable(
"VAL_LINK", $area->getHRef());
134 $link_str = $this->parent_obj->getMapAreaLinkString($area->getTarget(),
135 $area->getType(), $area->getTargetFrame());
136 $this->tpl->setVariable(
"VAL_LINK", $link_str);