ILIAS  release_8 Revision v8.24
class.ilAdvancedMDFieldDefinitionLocation.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
28{
29 public function getType(): int
30 {
32 }
33
34 public function isFilterSupported(): bool
35 {
36 return false;
37 }
38
39 protected function initADTDefinition(): ilADTDefinition
40 {
41 return ilADTFactory::getInstance()->getDefinitionInstanceByType("Location");
42 }
43
44 public function getValueForXML(ilADT $element): string
45 {
46 return $element->getLatitude() . "#" . $element->getLongitude() . "#" . $element->getZoom();
47 }
48
49 public function importValueFromXML(string $a_cdata): void
50 {
51 $parts = explode("#", $a_cdata);
52 if (count($parts) == 3) {
53 $adt = $this->getADT();
54 $adt->setLatitude((float) $parts[0]);
55 $adt->setLongitude((float) $parts[1]);
56 $adt->setZoom($parts[2]);
57 }
58 }
59
64 public function getLuceneSearchString($a_value): string
65 {
66 // #14777 - currently not supported
67 return '';
68 }
69}
ADT definition base class.
ADT base class.
Definition: class.ilADT.php:12
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getValueForXML(ilADT $element)
Parse ADT value for xml (export)
importValueFromXML(string $a_cdata)
Import value from xml.
if($clientAssertionType !='urn:ietf:params:oauth:client-assertion-type:jwt-bearer'|| $grantType !='client_credentials') $parts
Definition: ltitoken.php:64