ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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  {
25  include_once("./Services/Maps/classes/class.ilMapUtil.php");
26  $map_gui = ilMapUtil::getMapGUI();
27  $map_gui->setMapId("map_".uniqid()) // :TODO: sufficient entropy?
28  ->setLatitude($this->getADT()->getLatitude())
29  ->setLongitude($this->getADT()->getLongitude())
30  ->setZoom($this->getADT()->getZoom())
31  ->setEnableTypeControl(true)
32  ->setEnableLargeMapControl(true)
33  ->setEnableUpdateListener(false)
34  ->setEnableCentralMarker(true);
35 
36  if($this->width)
37  {
38  $map_gui->setWidth($this->width);
39  }
40  if($this->height)
41  {
42  $map_gui->setHeight($this->height);
43  }
44 
45  return $this->decorate($map_gui->getHtml());
46  }
47  }
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 49 of file class.ilADTLocationPresentationBridge.php.

References ilADTPresentationBridge\getADT().

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

◆ getSortable()

ilADTLocationPresentationBridge::getSortable ( )

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

References ilADTPresentationBridge\getADT().

59  {
60  if(!$this->getADT()->isNull())
61  {
62  // :TODO: probably does not make much sense
63  return $this->getADT()->getLatitude().";".$this->getADT()->getLongitude();
64  }
65  }
+ 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: