ILIAS  release_7 Revision v7.30-3-g800a261c036
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 $adt = $this->getADT();
55 $adt->setLatitude($parts[0]);
56 $adt->setLongitude($parts[1]);
57 $adt->setZoom($parts[2]);
58 }
59 }
60
61
62 //
63 // search
64 //
65
66 public function getLuceneSearchString($a_value)
67 {
68 // #14777 - currently not supported
69 return;
70
71 if ($a_value["tgl"]) {
72 }
73 }
74}
An exception for terminatinating execution or to throw for unit testing.
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)