ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
class.ilAdvancedMDFieldDefinitionLocation.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4require_once "Services/AdvancedMetaData/classes/class.ilAdvancedMDFieldDefinition.php";
5
15{
16 //
17 // generic types
18 //
19
20 public function getType()
21 {
23 }
24
25
26 //
27 // ADT
28 //
29
30 protected function initADTDefinition()
31 {
32 return ilADTFactory::getInstance()->getDefinitionInstanceByType("Location");
33 }
34
35
36 //
37 // import/export
38 //
39
40 public function getValueForXML(ilADT $element)
41 {
42 return $element->getLatitude()."#".$element->getLongitude()."#".$element->getZoom();
43 }
44
45 public function importValueFromXML($a_cdata)
46 {
47 $parts = explode("#", $a_cdata);
48 if(sizeof($parts) == 3)
49 {
50 $adt = $this->getADT();
51 $adt->setLatitude($parts[0]);
52 $adt->setLongitude($parts[1]);
53 $adt->setZoom($parts[2]);
54 }
55 }
56
57
58 //
59 // search
60 //
61
62 public function getLuceneSearchString($a_value)
63 {
64 // #14777 - currently not supported
65 return;
66
67 if($a_value["tgl"])
68 {
69
70 }
71 }
72}
73
74?>
static getInstance()
Get singleton.
ADT base class.
Definition: class.ilADT.php:12
getLuceneSearchString($a_value)
Get search string in lucene syntax.
getValueForXML(ilADT $element)
Parse ADT value for xml (export)