ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilADTLocationPresentationBridge Class Reference
+ Inheritance diagram for ilADTLocationPresentationBridge:
+ Collaboration diagram for ilADTLocationPresentationBridge:

Public Member Functions

 setSize ($a_width, $a_height)
 
 getHTML ()
 
 getList ()
 
 getSortable ()
 
- Public Member Functions inherited from ilADTPresentationBridge
 __construct (ilADT $a_adt)
 Constructor. More...
 
 getADT ()
 Get ADT. More...
 
 getList ()
 Get list presentation. More...
 
 getHTML ()
 Get HTML presentation. More...
 
 getSortable ()
 Get sortable value presentation. More...
 
 setDecoratorCallBack ($a_callback)
 Set decorator callback. More...
 

Protected Member Functions

 isValidADT (ilADT $a_adt)
 
- Protected Member Functions inherited from ilADTPresentationBridge
 isValidADT (ilADT $a_adt)
 Check if given ADT is valid. More...
 
 setADT (ilADT $a_adt)
 Set ADT. More...
 
 decorate ($a_value)
 Decorate value. More...
 

Protected Attributes

 $width
 
 $height
 
- Protected Attributes inherited from ilADTPresentationBridge
 $adt
 
 $decorator
 

Detailed Description

Definition at line 5 of file class.ilADTLocationPresentationBridge.php.

Member Function Documentation

◆ getHTML()

ilADTLocationPresentationBridge::getHTML ( )

Definition at line 21 of file class.ilADTLocationPresentationBridge.php.

References ilADTPresentationBridge\decorate(), ilADTPresentationBridge\getADT(), and ilMapUtil\getMapGUI().

22  {
23  if (!$this->getADT()->isNull()) {
24  include_once("./Services/Maps/classes/class.ilMapUtil.php");
25  $map_gui = ilMapUtil::getMapGUI();
26  $map_gui->setMapId("map_" . uniqid()) // :TODO: sufficient entropy?
27  ->setLatitude($this->getADT()->getLatitude())
28  ->setLongitude($this->getADT()->getLongitude())
29  ->setZoom($this->getADT()->getZoom())
30  ->setEnableTypeControl(true)
31  ->setEnableLargeMapControl(true)
32  ->setEnableUpdateListener(false)
33  ->setEnableCentralMarker(true);
34 
35  if ($this->width) {
36  $map_gui->setWidth($this->width);
37  }
38  if ($this->height) {
39  $map_gui->setHeight($this->height);
40  }
41 
42  return $this->decorate($map_gui->getHtml());
43  }
44  }
decorate($a_value)
Decorate value.
static getMapGUI()
Get an instance of the GUI class.
+ Here is the call graph for this function:

◆ getList()

ilADTLocationPresentationBridge::getList ( )

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

References ilADTPresentationBridge\getADT().

47  {
48  if (!$this->getADT()->isNull()) {
49  // :TODO: probably does not make much sense
50  return $this->getADT()->getLatitude() . "°/" . $this->getADT()->getLongitude() . "°";
51  }
52  }
+ Here is the call graph for this function:

◆ getSortable()

ilADTLocationPresentationBridge::getSortable ( )

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

References ilADTPresentationBridge\getADT().

55  {
56  if (!$this->getADT()->isNull()) {
57  // :TODO: probably does not make much sense
58  return $this->getADT()->getLatitude() . ";" . $this->getADT()->getLongitude();
59  }
60  }
+ Here is the call graph for this function:

◆ isValidADT()

ilADTLocationPresentationBridge::isValidADT ( ilADT  $a_adt)
protected

Definition at line 10 of file class.ilADTLocationPresentationBridge.php.

11  {
12  return ($a_adt instanceof ilADTLocation);
13  }

◆ setSize()

ilADTLocationPresentationBridge::setSize (   $a_width,
  $a_height 
)

Definition at line 15 of file class.ilADTLocationPresentationBridge.php.

16  {
17  $this->width = $a_width;
18  $this->height = $a_height;
19  }

Field Documentation

◆ $height

ilADTLocationPresentationBridge::$height
protected

Definition at line 8 of file class.ilADTLocationPresentationBridge.php.

◆ $width

ilADTLocationPresentationBridge::$width
protected

Definition at line 7 of file class.ilADTLocationPresentationBridge.php.


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