ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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 public function isFilterSupported()
26 {
27 return false;
28 }
29
30
31 //
32 // ADT
33 //
34
35 protected function initADTDefinition()
36 {
37 return ilADTFactory::getInstance()->getDefinitionInstanceByType("Location");
38 }
39
40
41 //
42 // import/export
43 //
44
45 public function getValueForXML(ilADT $element)
46 {
47 return $element->getLatitude()."#".$element->getLongitude()."#".$element->getZoom();
48 }
49
50 public function importValueFromXML($a_cdata)
51 {
52 $parts = explode("#", $a_cdata);
53 if(sizeof($parts) == 3)
54 {
55 $adt = $this->getADT();
56 $adt->setLatitude($parts[0]);
57 $adt->setLongitude($parts[1]);
58 $adt->setZoom($parts[2]);
59 }
60 }
61
62
63 //
64 // search
65 //
66
67 public function getLuceneSearchString($a_value)
68 {
69 // #14777 - currently not supported
70 return;
71
72 if($a_value["tgl"])
73 {
74
75 }
76 }
77}
78
79?>
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)