ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilADTLocationPresentationBridge Class Reference
+ Inheritance diagram for ilADTLocationPresentationBridge:
+ Collaboration diagram for ilADTLocationPresentationBridge:

Public Member Functions

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

Protected Member Functions

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

Protected Attributes

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

Detailed Description

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

Member Function Documentation

ilADTLocationPresentationBridge::getHTML ( )

Get HTML presentation.

Returns
string

Reimplemented from ilADTPresentationBridge.

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

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

{
if(!$this->getADT()->isNull())
{
include_once("./Services/Maps/classes/class.ilMapUtil.php");
$map_gui = ilMapUtil::getMapGUI();
$map_gui->setMapId("map_".uniqid()) // :TODO: sufficient entropy?
->setLatitude($this->getADT()->getLatitude())
->setLongitude($this->getADT()->getLongitude())
->setZoom($this->getADT()->getZoom())
->setEnableTypeControl(true)
->setEnableLargeMapControl(true)
->setEnableUpdateListener(false)
->setEnableCentralMarker(true);
if($this->width)
{
$map_gui->setWidth($this->width);
}
if($this->height)
{
$map_gui->setHeight($this->height);
}
return $map_gui->getHtml();
}
}

+ Here is the call graph for this function:

ilADTLocationPresentationBridge::getList ( )

Get list presentation.

Returns
string

Reimplemented from ilADTPresentationBridge.

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

References ilADTPresentationBridge\getADT().

{
if(!$this->getADT()->isNull())
{
// :TODO: probably does not make much sense
return $this->getADT()->getLatitude()."°/".$this->getADT()->getLongitude()."°";
}
}

+ Here is the call graph for this function:

ilADTLocationPresentationBridge::getSortable ( )

Get sortable value presentation.

Returns
mixed

Reimplemented from ilADTPresentationBridge.

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

References ilADTPresentationBridge\getADT().

{
if(!$this->getADT()->isNull())
{
// :TODO: probably does not make much sense
return $this->getADT()->getLatitude().";".$this->getADT()->getLongitude();
}
}

+ Here is the call graph for this function:

ilADTLocationPresentationBridge::isValidADT ( ilADT  $a_adt)
protected

Check if given ADT is valid.

:TODO: This could be avoided with type-specifc constructors :TODO: bridge base class?

Parameters
ilADT$a_adt

Reimplemented from ilADTPresentationBridge.

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

{
return ($a_adt instanceof ilADTLocation);
}
ilADTLocationPresentationBridge::setSize (   $a_width,
  $a_height 
)

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

{
$this->width = $a_width;
$this->height = $a_height;
}

Field Documentation

ilADTLocationPresentationBridge::$height
protected

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

ilADTLocationPresentationBridge::$width
protected

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


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