ILIAS  Release_4_4_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilMapArea Class Reference

Class ilMapArea. More...

+ Collaboration diagram for ilMapArea:

Public Member Functions

 ilMapArea ($a_item_id=0, $a_nr=0)
 map area
 create ()
 create persistent map area object in db
 _getMaxNr ($a_item_id)
 get maximum nr of media item (static)
 read ()
 read map area data into object (item id and nr must be set)
 update ()
 update map area
 _resolveIntLinks ($a_item_id)
 resolve internal links of an item id
 _getIntLinks ($a_item_id)
 get all internal links of a media items map areas
 getAllHighlightModes ()
 Get all highlight modes.
 setHighlightMode ($a_val)
 Set highlight mode.
 getHighlightMode ()
 Get highlight mode.
 getAllHighlightClasses ()
 Get all highlight classes.
 setHighlightClass ($a_val)
 Set highlight class.
 getHighlightClass ()
 Get highlight class.
 setItemId ($a_item_id)
 set media item id
 getItemId ()
 get item id
 setNr ($a_nr)
 set area number
 getNr ()
 get area number
 setShape ($a_shape)
 set shape (IL_AREA_RECT, IL_AREA_CIRCLE, IL_AREA_POLY, IL_AREA_WHOLE_PICTURE)
 getShape ()
 get shape
 setCoords ($a_coords)
 set coords of area
 getCoords ()
 get coords
 setTitle ($a_title)
 set (tooltip)title of area
 appendTitle ($a_title_str)
 append string to (tooltip) title of area
 getTitle ()
 get (tooltip) title
 setLinkType ($a_link_type)
 set link type
 getLinkType ()
 get link type
 setHref ($a_href)
 set hyper reference (external link only)
 getHref ()
 get hyper reference url (external link only)
 setExtTitle ($a_title)
 set link text (external link only)
 getExtTitle ()
 get link text (external link only)
 setTarget ($a_target)
 set link target (internal link only)
 getTarget ($a_insert_inst=false)
 get link target (internal link only)
 setType ($a_type)
 set link type (internal link only)
 getType ()
 get link type (internal link only)
 setTargetFrame ($a_target_frame)
 set link target frame (internal link only)
 getTargetFrame ()
 get link target frame (internal link only)
 draw (&$a_image, $a_col1, $a_col2, $a_close_poly=true, $a_x_ratio=1, $a_y_ratio=1)
 draw image to
 drawLine (&$im, $x1, $y1, $x2, $y2, $c1, $c2)
 draws an outlined two color line in an image
 drawRect (&$im, $coords, $c1, $c2, $a_x_ratio=1, $a_y_ratio=1)
 draws an outlined two color rectangle
 drawPoly (&$im, $coords, $c1, $c2, $closed, $a_x_ratio=1, $a_y_ratio=1)
 draws an outlined two color polygon
 drawCircle (&$im, $coords, $c1, $c2, $a_x_ratio=1, $a_y_ratio=1)
 draws an outlined two colored circle
 countCoords ($c)
 count the number of coordinates (x,y) in a coordinate string (format: "x1,y1,x2,y2,x3,y3,...")

Static Public Member Functions

static _getMobsForTarget ($a_type, $a_target)
 Get areas for a certain target.

Data Fields

const HL_NONE = ""
const HL_HOVER = "Hover"
const HL_ALWAYS = "Always"
const HLCL_ACCENTED = ""
const HLCL_LIGHT = "Light"
const HLCL_DARK = "Dark"
 $item_id
 $nr
 $shape
 $coords
 $title
 $linktype
 $xl_title
 $xl_href
 $il_target
 $il_type
 $il_target_frame

Detailed Description

Class ilMapArea.

Map Area of an Image Map, subobject of Media Item

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
Id:
class.ilMapArea.php 37237 2012-09-28 11:42:38Z akill

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

Member Function Documentation

ilMapArea::_getIntLinks (   $a_item_id)

get all internal links of a media items map areas

Parameters
int$a_item_idmedia item id

Definition at line 207 of file class.ilMapArea.php.

References IL_INT_LINK.

Referenced by ilMediaItem\_getMapAreasIntLinks(), and ilObjMediaObject\getLinkedMediaObjects().

{
global $ilDB;
$q = "SELECT * FROM map_area WHERE item_id = ".
$ilDB->quote($a_item_id, "integer");
$area_set = $ilDB->query($q);
$links = array();
while ($area_rec = $ilDB->fetchAssoc($area_set))
{
$target = $area_rec["target"];
$type = $area_rec["type"];
$targetframe = $area_rec["target_frame"];
if (($area_rec["link_type"] == IL_INT_LINK) && (is_int(strpos($target, "__"))))
{
$links[$target.":".$type.":".$targetframe] =
array("Target" => $target, "Type" => $type,
"TargetFrame" => $targetframe);
}
}
return $links;
}

+ Here is the caller graph for this function:

ilMapArea::_getMaxNr (   $a_item_id)

get maximum nr of media item (static)

Parameters
int$a_item_iditem id
Returns
int maximum nr

Definition at line 107 of file class.ilMapArea.php.

Referenced by ilMediaItem\_getMediaItemsOfMOb(), ilImageMapEditorGUI\deleteAreas(), ilImageMapTableGUI\getItems(), ilMediaItem\read(), ilImageMapEditorGUI\saveArea(), and ilImageMapEditorGUI\updateAreas().

{
global $ilDB;
$q = "SELECT max(nr) AS max_nr FROM map_area WHERE item_id = ".
$ilDB->quote($a_item_id, "integer");
$max_set = $ilDB->query($q);
$max_rec = $ilDB->fetchAssoc($max_set);
return $max_rec["max_nr"];
}

+ Here is the caller graph for this function:

static ilMapArea::_getMobsForTarget (   $a_type,
  $a_target 
)
static

Get areas for a certain target.

Definition at line 236 of file class.ilMapArea.php.

References $mobs, and ilMediaItem\_lookupMobId().

Referenced by ilLMObject\updateInternalLinks().

{
global $ilDB;
$q = "SELECT * FROM map_area WHERE ".
" link_type = ".$ilDB->quote($a_type, "text").
" AND target = ".$ilDB->quote($a_target, "text");
$set = $ilDB->query($q);
$mobs = array();
while($rec = $ilDB->fetchAssoc($set))
{
$mob_id = ilMediaItem::_lookupMobId($rec["item_id"]);
$mobs[$mob_id] = $mob_id;
}
return $mobs;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilMapArea::_resolveIntLinks (   $a_item_id)

resolve internal links of an item id

Definition at line 172 of file class.ilMapArea.php.

References $item_id, $nr, $query, ilInternalLink\_getIdForImportId(), and IL_INT_LINK.

Referenced by ilMediaItem\_resolveMapAreaLinks().

{
global $ilDB;
//echo "maparea::resolve<br>";
$q = "SELECT * FROM map_area WHERE item_id = ".
$ilDB->quote($a_item_id, "integer");
$area_set = $ilDB->query($q);
while ($area_rec = $ilDB->fetchAssoc($area_set))
{
$target = $area_rec["target"];
$type = $area_rec["type"];
$item_id = $area_rec["item_id"];
$nr = $area_rec["nr"];
if (($area_rec["link_type"] == IL_INT_LINK) && (!is_int(strpos($target, "__"))))
{
$new_target = ilInternalLink::_getIdForImportId($type, $target);
if ($new_target !== false)
{
$query = "UPDATE map_area SET ".
"target = ".$ilDB->quote($new_target, "text")." ".
"WHERE item_id = ".$ilDB->quote($item_id, "integer").
" AND nr = ".$ilDB->quote($nr, "integer");
$ilDB->manipulate($query);
}
}
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilMapArea::appendTitle (   $a_title_str)

append string to (tooltip) title of area

Parameters
string$a_title_strtitle string

Definition at line 426 of file class.ilMapArea.php.

{
$this->title.= $a_title_str;
}
ilMapArea::countCoords (   $c)

count the number of coordinates (x,y) in a coordinate string (format: "x1,y1,x2,y2,x3,y3,...")

Parameters
string$ccoordinate string

Definition at line 706 of file class.ilMapArea.php.

Referenced by ilImageMapEditorGUI\addArea(), drawPoly(), ilImageMapEditorGUI\editMapArea(), and ilImageMapEditorGUI\setShape().

{
if ($c == "")
{
return 0;
}
else
{
$coord_array = explode(",", $c);
return (count($coord_array) / 2);
}
}

+ Here is the caller graph for this function:

ilMapArea::create ( )

create persistent map area object in db

Definition at line 78 of file class.ilMapArea.php.

References getCoords(), getHighlightClass(), getHighlightMode(), getHref(), getItemId(), getLinkType(), getNr(), getShape(), getTarget(), getTargetFrame(), getTitle(), and getType().

{
global $ilDB;
$q = "INSERT INTO map_area (item_id, nr, shape, ".
"coords, link_type, title, href, target, type, highlight_mode, highlight_class, target_frame) ".
" VALUES (".
$ilDB->quote($this->getItemId(), "integer").",".
$ilDB->quote($this->getNr(), "integer").",".
$ilDB->quote($this->getShape(), "text").",".
$ilDB->quote($this->getCoords(), "text").",".
$ilDB->quote($this->getLinkType(), "text").",".
$ilDB->quote($this->getTitle(), "text").",".
$ilDB->quote($this->getHref(), "text").",".
$ilDB->quote($this->getTarget(), "text").",".
$ilDB->quote($this->getType(), "text").",".
$ilDB->quote($this->getHighlightMode(), "text").",".
$ilDB->quote($this->getHighlightClass(), "text").",".
$ilDB->quote($this->getTargetFrame(), "text").")";
$ilDB->manipulate($q);
}

+ Here is the call graph for this function:

ilMapArea::draw ( $a_image,
  $a_col1,
  $a_col2,
  $a_close_poly = true,
  $a_x_ratio = 1,
  $a_y_ratio = 1 
)

draw image to

Parameters
boolean$a_close_polyclose polygon

Definition at line 576 of file class.ilMapArea.php.

References drawCircle(), drawPoly(), drawRect(), getCoords(), and getShape().

{
switch ($this->getShape())
{
case "Rect" :
$this->drawRect($a_image, $this->getCoords(), $a_col1, $a_col2,
$a_x_ratio, $a_y_ratio);
break;
case "Circle" :
$this->drawCircle($a_image, $this->getCoords(), $a_col1, $a_col2,
$a_x_ratio, $a_y_ratio);
break;
case "Poly" :
$this->drawPoly($a_image, $this->getCoords(), $a_col1, $a_col2, $a_close_poly,
$a_x_ratio, $a_y_ratio);
break;
}
}

+ Here is the call graph for this function:

ilMapArea::drawCircle ( $im,
  $coords,
  $c1,
  $c2,
  $a_x_ratio = 1,
  $a_y_ratio = 1 
)

draws an outlined two colored circle

Parameters
int$imimage identifier as returned by ImageCreateFromGIF()
string$coordscoordinate string, format : "x,y,r" with (x,y) as center point and r as radius
int$c1color identifier 1
int$c3color identifier 2

Definition at line 690 of file class.ilMapArea.php.

References $coords.

Referenced by draw().

{
$c = explode(",", $coords);
imagearc($im, $c[0] / $a_x_ratio, $c[1] / $a_y_ratio,
($c[2]+1)*2 / $a_x_ratio, ($c[2]+1)*2 / $a_y_ratio, 1, 360, $c1);
imagearc($im, $c[0] / $a_x_ratio, $c[1] / $a_y_ratio,
($c[2]-1)*2 / $a_x_ratio, ($c[2]-1)*2 / $a_y_ratio, 1, 360, $c1);
imagearc($im, $c[0] / $a_x_ratio, $c[1] / $a_y_ratio,
$c[2]*2 / $a_x_ratio, $c[2]*2 / $a_y_ratio, 1, 360, $c2);
}

+ Here is the caller graph for this function:

ilMapArea::drawLine ( $im,
  $x1,
  $y1,
  $x2,
  $y2,
  $c1,
  $c2 
)

draws an outlined two color line in an image

Parameters
int$imimage identifier as returned by ImageCreateFromGIF() etc.
int$x1x-coordinate of starting point
int$y1y-coordinate of starting point
int$x2x-coordinate of ending point
int$y2y-coordinate of ending point
int$c1color identifier 1
int$c2color identifier 2

Definition at line 609 of file class.ilMapArea.php.

Referenced by drawPoly(), and drawRect().

{
imageline($im, $x1+1, $y1, $x2+1, $y2, $c1);
imageline($im, $x1-1, $y1, $x2-1, $y2, $c1);
imageline($im, $x1, $y1+1, $x2, $y2+1, $c1);
imageline($im, $x1, $y1-1, $x2, $y2-1, $c1);
imageline($im, $x1, $y1, $x2, $y2, $c2);
}

+ Here is the caller graph for this function:

ilMapArea::drawPoly ( $im,
  $coords,
  $c1,
  $c2,
  $closed,
  $a_x_ratio = 1,
  $a_y_ratio = 1 
)

draws an outlined two color polygon

Parameters
int$imimage identifier as returned by ImageCreateFromGIF() etc.
string$coordscoordinate string, format : "x1,y1,x2,y2,..." with every (x,y) pair is an ending point of a line of the polygon
int$c1color identifier 1
int$c3color identifier 2
boolean$closedtrue: the first and the last point will be connected with a line

Definition at line 652 of file class.ilMapArea.php.

References $coords, countCoords(), and drawLine().

Referenced by draw().

{
if ($closed)
{
$p = 0;
}
else
{
$p = 1;
}
if ($anz < (3 - $p))
{
return;
}
$c = explode(",", $coords);
for($i=0; $i<$anz-$p; $i++)
{
$this->drawLine($im, $c[$i*2] / $a_x_ratio, $c[$i*2+1] / $a_y_ratio,
$c[($i*2+2)%(2*$anz)] / $a_x_ratio,
$c[($i*2+3)%(2*$anz)] / $a_y_ratio, $c1, $c2);
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilMapArea::drawRect ( $im,
  $coords,
  $c1,
  $c2,
  $a_x_ratio = 1,
  $a_y_ratio = 1 
)

draws an outlined two color rectangle

Parameters
int$imimage identifier as returned by ImageCreateFromGIF() etc.
string$coordscoordinate string, format : "x1,y1,x2,y2" with (x1,y1) is top left and (x2,y2) is bottom right point of the rectangle
int$c1color identifier 1
int$c2color identifier 2

Definition at line 627 of file class.ilMapArea.php.

References $coords, and drawLine().

Referenced by draw().

{
$coord=explode(",", $coords);
$this->drawLine($im, $coord[0] / $a_x_ratio, $coord[1] / $a_y_ratio,
$coord[0] / $a_x_ratio, $coord[3] / $a_y_ratio, $c1, $c2);
$this->drawLine($im, $coord[0] / $a_x_ratio, $coord[3] / $a_y_ratio,
$coord[2] / $a_x_ratio, $coord[3] / $a_y_ratio, $c1, $c2);
$this->drawLine($im, $coord[2] / $a_x_ratio, $coord[3] / $a_y_ratio,
$coord[2] / $a_x_ratio, $coord[1] / $a_y_ratio, $c1, $c2);
$this->drawLine($im, $coord[2] / $a_x_ratio, $coord[1] / $a_y_ratio,
$coord[0] / $a_x_ratio, $coord[1] / $a_y_ratio, $c1, $c2);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilMapArea::getAllHighlightClasses ( )

Get all highlight classes.

Parameters
@return

Definition at line 300 of file class.ilMapArea.php.

References $lng.

Referenced by ilImageMapTableGUI\__construct().

{
global $lng;
return array(
self::HLCL_ACCENTED => $lng->txt("cont_accented"),
self::HLCL_LIGHT => $lng->txt("cont_light"),
self::HLCL_DARK => $lng->txt("cont_dark"),
);
}

+ Here is the caller graph for this function:

ilMapArea::getAllHighlightModes ( )

Get all highlight modes.

Parameters
@return

Definition at line 261 of file class.ilMapArea.php.

References $lng.

Referenced by ilImageMapTableGUI\__construct().

{
global $lng;
return array(
self::HL_NONE => $lng->txt("cont_none"),
self::HL_HOVER => $lng->txt("cont_hover"),
self::HL_ALWAYS => $lng->txt("cont_always")
);
}

+ Here is the caller graph for this function:

ilMapArea::getCoords ( )

get coords

Returns
string coords (comma separated integers)

Definition at line 406 of file class.ilMapArea.php.

References $coords.

Referenced by create(), draw(), and update().

{
return $this->coords;
}

+ Here is the caller graph for this function:

ilMapArea::getExtTitle ( )

get link text (external link only)

Returns
string link text

Definition at line 496 of file class.ilMapArea.php.

References $xl_title.

{
}
ilMapArea::getHighlightClass ( )

Get highlight class.

Returns
string highlight class

Definition at line 326 of file class.ilMapArea.php.

Referenced by create(), and update().

{
return $this->highlight_class;
}

+ Here is the caller graph for this function:

ilMapArea::getHighlightMode ( )

Get highlight mode.

Returns
string highlight mode

Definition at line 289 of file class.ilMapArea.php.

Referenced by create(), and update().

{
return $this->highlight_mode;
}

+ Here is the caller graph for this function:

ilMapArea::getHref ( )

get hyper reference url (external link only)

Parameters
stringhyper ref url

Definition at line 476 of file class.ilMapArea.php.

References $xl_href.

Referenced by create(), and update().

{
}

+ Here is the caller graph for this function:

ilMapArea::getItemId ( )

get item id

Returns
int media item id

Definition at line 346 of file class.ilMapArea.php.

References $item_id.

Referenced by create(), read(), and update().

{
}

+ Here is the caller graph for this function:

ilMapArea::getLinkType ( )

get link type

Returns
int link type (IL_INT_LINK, IL_EXT_LINK)

Definition at line 456 of file class.ilMapArea.php.

References $linktype.

Referenced by create(), and update().

{
}

+ Here is the caller graph for this function:

ilMapArea::getNr ( )

get area number

Returns
int number (of area within parent media object)

Definition at line 366 of file class.ilMapArea.php.

References $nr.

Referenced by create(), read(), and update().

{
return $this->nr;
}

+ Here is the caller graph for this function:

ilMapArea::getShape ( )

get shape

Returns
string (IL_AREA_RECT, IL_AREA_CIRCLE, IL_AREA_POLY, IL_AREA_WHOLE_PICTURE)

Definition at line 386 of file class.ilMapArea.php.

References $shape.

Referenced by create(), draw(), and update().

{
return $this->shape;
}

+ Here is the caller graph for this function:

ilMapArea::getTarget (   $a_insert_inst = false)

get link target (internal link only)

Returns
string link target

Definition at line 516 of file class.ilMapArea.php.

References $il_target.

Referenced by create(), and update().

{
$target = $this->il_target;
if ((substr($target, 0, 4) == "il__") && $a_insert_inst)
{
$target = "il_".IL_INST_ID."_".substr($target, 4, strlen($target) - 4);
}
return $target;
}

+ Here is the caller graph for this function:

ilMapArea::getTargetFrame ( )

get link target frame (internal link only)

Returns
string link target frame target frame (IL_TF_MEDIA | IL_TF_FAQ | IL_TF_GLOSSARY | IL_TF_NEW)

Definition at line 566 of file class.ilMapArea.php.

References $il_target_frame.

Referenced by create(), and update().

+ Here is the caller graph for this function:

ilMapArea::getTitle ( )

get (tooltip) title

Returns
string title

Definition at line 436 of file class.ilMapArea.php.

References $title.

Referenced by create(), and update().

{
return $this->title;
}

+ Here is the caller graph for this function:

ilMapArea::getType ( )

get link type (internal link only)

Returns
string (IL_LT_STRUCTURE | IL_LT_PAGE | IL_LT_MEDIA | IL_LT_GLITEM)

Definition at line 544 of file class.ilMapArea.php.

References $il_type.

Referenced by create(), and update().

{
}

+ Here is the caller graph for this function:

ilMapArea::ilMapArea (   $a_item_id = 0,
  $a_nr = 0 
)

map area

Parameters
int$a_item_idparent media item id
int$a_nrmap area number within media item

Definition at line 64 of file class.ilMapArea.php.

References read(), setItemId(), and setNr().

{
$this->title = "";
if ($a_item_id !=0 && $a_nr != 0)
{
$this->setItemId($a_item_id);
$this->setNr($a_nr);
$this->read();
}
}

+ Here is the call graph for this function:

ilMapArea::read ( )

read map area data into object (item id and nr must be set)

Definition at line 122 of file class.ilMapArea.php.

References getItemId(), getNr(), setCoords(), setHighlightClass(), setHighlightMode(), setHref(), setLinkType(), setNr(), setShape(), setTarget(), setTargetFrame(), setTitle(), and setType().

Referenced by ilMapArea().

{
global $ilDB;
$q = "SELECT * FROM map_area WHERE item_id = ".
$ilDB->quote($this->getItemId(), "integer").
" AND nr = ".$ilDB->quote($this->getNr(), "integer");
$area_set = $ilDB->query($q);
$area_rec = $ilDB->fetchAssoc($area_set);
$this->setShape($area_rec["shape"]);
//echo $area_rec["Shape"];
$this->setNr($area_rec["nr"]);
$this->setCoords($area_rec["coords"]);
$this->setLinkType($area_rec["link_type"]);
$this->setTitle($area_rec["title"]);
$this->setHref($area_rec["href"]);
$this->setTarget($area_rec["target"]);
$this->setType($area_rec["type"]);
$this->setTargetFrame($area_rec["target_frame"]);
$this->setHighlightMode($area_rec["highlight_mode"]);
$this->setHighlightClass($area_rec["highlight_class"]);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilMapArea::setCoords (   $a_coords)

set coords of area

Parameters
string$a_coordscoords (comma separated integers)

Definition at line 396 of file class.ilMapArea.php.

Referenced by read().

{
$this->coords = $a_coords;
}

+ Here is the caller graph for this function:

ilMapArea::setExtTitle (   $a_title)

set link text (external link only)

Parameters
string$a_titlelink text

Definition at line 486 of file class.ilMapArea.php.

{
$this->xl_title = $a_title;
}
ilMapArea::setHighlightClass (   $a_val)

Set highlight class.

Parameters
string$a_valhighlight class

Definition at line 316 of file class.ilMapArea.php.

Referenced by read().

{
$this->highlight_class = $a_val;
}

+ Here is the caller graph for this function:

ilMapArea::setHighlightMode (   $a_val)

Set highlight mode.

Parameters
string$a_valhighlight mode

Definition at line 279 of file class.ilMapArea.php.

Referenced by read().

{
$this->highlight_mode = $a_val;
}

+ Here is the caller graph for this function:

ilMapArea::setHref (   $a_href)

set hyper reference (external link only)

Parameters
string$a_hrefhyper ref url

Definition at line 466 of file class.ilMapArea.php.

Referenced by read().

{
$this->xl_href = $a_href;
}

+ Here is the caller graph for this function:

ilMapArea::setItemId (   $a_item_id)

set media item id

Parameters
int$a_item_idmedia item id

Definition at line 336 of file class.ilMapArea.php.

Referenced by ilMapArea().

{
$this->item_id = $a_item_id;
}

+ Here is the caller graph for this function:

ilMapArea::setLinkType (   $a_link_type)

set link type

Parameters
string$a_linktypelink type (IL_INT_LINK, IL_EXT_LINK)

Definition at line 446 of file class.ilMapArea.php.

Referenced by read(), and ilImageMapEditorGUI\saveArea().

{
$this->linktype = $a_link_type;
}

+ Here is the caller graph for this function:

ilMapArea::setNr (   $a_nr)

set area number

Parameters
int$a_nrnumber (of area within parent media object)

Definition at line 356 of file class.ilMapArea.php.

Referenced by ilMapArea(), and read().

{
$this->nr = $a_nr;
}

+ Here is the caller graph for this function:

ilMapArea::setShape (   $a_shape)

set shape (IL_AREA_RECT, IL_AREA_CIRCLE, IL_AREA_POLY, IL_AREA_WHOLE_PICTURE)

Parameters
string$a_shapeshape of map area

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

Referenced by read(), and ilImageMapEditorGUI\saveArea().

{
$this->shape = $a_shape;
}

+ Here is the caller graph for this function:

ilMapArea::setTarget (   $a_target)

set link target (internal link only)

Parameters
string$a_targetlink target (e.g. "il__pg_23")

Definition at line 506 of file class.ilMapArea.php.

Referenced by read().

{
$this->il_target = $a_target;
}

+ Here is the caller graph for this function:

ilMapArea::setTargetFrame (   $a_target_frame)

set link target frame (internal link only)

Parameters
string$a_target_frametarget frame (IL_TF_MEDIA | IL_TF_FAQ | IL_TF_GLOSSARY | IL_TF_NEW)

Definition at line 555 of file class.ilMapArea.php.

Referenced by read().

{
$this->il_target_frame = $a_target_frame;
}

+ Here is the caller graph for this function:

ilMapArea::setTitle (   $a_title)

set (tooltip)title of area

Parameters
string$a_titletitle

Definition at line 416 of file class.ilMapArea.php.

Referenced by read(), and ilImageMapEditorGUI\updateAreas().

{
$this->title = $a_title;
}

+ Here is the caller graph for this function:

ilMapArea::setType (   $a_type)

set link type (internal link only)

Parameters
string$a_typelink type (IL_LT_STRUCTURE | IL_LT_PAGE | IL_LT_MEDIA | IL_LT_GLITEM)

Definition at line 534 of file class.ilMapArea.php.

Referenced by read().

{
$this->il_type = $a_type;
}

+ Here is the caller graph for this function:

ilMapArea::update ( )

update map area

Definition at line 150 of file class.ilMapArea.php.

References getCoords(), getHighlightClass(), getHighlightMode(), getHref(), getItemId(), getLinkType(), getNr(), getShape(), getTarget(), getTargetFrame(), getTitle(), and getType().

{
global $ilDB;
$q = "UPDATE map_area SET shape = ".$ilDB->quote($this->getShape(), "text").
", coords = ".$ilDB->quote($this->getCoords(), "text").
", link_type = ".$ilDB->quote($this->getLinkType(), "text").
", title = ".$ilDB->quote($this->getTitle(), "text").
", href = ".$ilDB->quote($this->getHref(), "text").
", target = ".$ilDB->quote($this->getTarget(), "text").
", type = ".$ilDB->quote($this->getType(), "text").
", highlight_mode = ".$ilDB->quote($this->getHighlightMode(), "text").
", highlight_class = ".$ilDB->quote($this->getHighlightClass(), "text").
", target_frame = ".$ilDB->quote($this->getTargetFrame(), "text").
" WHERE item_id = ".$ilDB->quote($this->getItemId(), "integer").
" AND nr = ".$ilDB->quote($this->getNr(), "integer");
$ilDB->manipulate($q);
}

+ Here is the call graph for this function:

Field Documentation

ilMapArea::$coords

Definition at line 48 of file class.ilMapArea.php.

Referenced by drawCircle(), drawPoly(), drawRect(), and getCoords().

ilMapArea::$il_target

Definition at line 53 of file class.ilMapArea.php.

Referenced by getTarget().

ilMapArea::$il_target_frame

Definition at line 55 of file class.ilMapArea.php.

Referenced by getTargetFrame().

ilMapArea::$il_type

Definition at line 54 of file class.ilMapArea.php.

Referenced by getType().

ilMapArea::$item_id

Definition at line 45 of file class.ilMapArea.php.

Referenced by _resolveIntLinks(), and getItemId().

ilMapArea::$linktype

Definition at line 50 of file class.ilMapArea.php.

Referenced by getLinkType().

ilMapArea::$nr

Definition at line 46 of file class.ilMapArea.php.

Referenced by _resolveIntLinks(), and getNr().

ilMapArea::$shape

Definition at line 47 of file class.ilMapArea.php.

Referenced by getShape().

ilMapArea::$title

Definition at line 49 of file class.ilMapArea.php.

Referenced by getTitle().

ilMapArea::$xl_href

Definition at line 52 of file class.ilMapArea.php.

Referenced by getHref().

ilMapArea::$xl_title

Definition at line 51 of file class.ilMapArea.php.

Referenced by getExtTitle().

const ilMapArea::HL_ALWAYS = "Always"

Definition at line 40 of file class.ilMapArea.php.

const ilMapArea::HL_HOVER = "Hover"

Definition at line 39 of file class.ilMapArea.php.

const ilMapArea::HL_NONE = ""

Definition at line 38 of file class.ilMapArea.php.

const ilMapArea::HLCL_ACCENTED = ""

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

const ilMapArea::HLCL_DARK = "Dark"

Definition at line 43 of file class.ilMapArea.php.

const ilMapArea::HLCL_LIGHT = "Light"

Definition at line 42 of file class.ilMapArea.php.


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