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;
32 $this->
setRowTemplate(
"tpl.image_map_table_row.html",
"Services/MediaObjects");
49 $this->
addColumn($this->lng->txt(
"cont_name"),
"title",
"");
50 $this->
addColumn($this->lng->txt(
"cont_shape"),
"",
"");
51 $this->
addColumn($this->lng->txt(
"cont_coords"),
"",
"");
52 $this->
addColumn($this->lng->txt(
"cont_link"),
"",
"");
65 $this->
addMultiCommand(
"editShapeWholePicture", $lng->txt(
"cont_edit_shape_whole_picture"));
66 $this->
addMultiCommand(
"editShapeRectangle", $lng->txt(
"cont_edit_shape_rectangle"));
67 $this->
addMultiCommand(
"editShapeCircle", $lng->txt(
"cont_edit_shape_circle"));
68 $this->
addMultiCommand(
"editShapePolygon", $lng->txt(
"cont_edit_shape_polygon"));
83 $st_item =& $this->media_object->getMediaItem(
"Standard");
87 include_once(
"./Services/MediaObjects/classes/class.ilMapArea.php");
88 for ($i=1; $i<=$max; $i++)
90 $area =
new ilMapArea($st_item->getId(), $i);
91 $areas[] = array(
"nr" => $i,
"area" => $area,
"title" => $area->getTitle());
105 $area = $a_set[
"area"];
107 $this->tpl->setVariable(
"CHECKBOX",
108 ilUtil::formCheckBox(
"",
"area[]", $i));
109 $this->tpl->setVariable(
"VAR_NAME",
"name_".$i);
110 $this->tpl->setVariable(
"VAL_NAME", $area->getTitle());
111 $this->tpl->setVariable(
"VAL_SHAPE", $area->getShape());
112 $this->tpl->setVariable(
"VAL_COORDS",
113 implode(explode(
",", $area->getCoords()),
", "));
114 switch ($area->getLinkType())
117 $this->tpl->setVariable(
"VAL_LINK", $area->getHRef());
121 $link_str = $this->parent_obj->getMapAreaLinkString($area->getTarget(),
122 $area->getType(), $area->getTargetFrame());
123 $this->tpl->setVariable(
"VAL_LINK", $link_str);