ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilAdvancedMDFieldDefinitionLocation.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
27{
28 public function getType(): int
29 {
31 }
32
33 public function isFilterSupported(): bool
34 {
35 return false;
36 }
37
38 protected function initADTDefinition(): ilADTDefinition
39 {
40 return ilADTFactory::getInstance()->getDefinitionInstanceByType("Location");
41 }
42
43 public function getValueForXML(ilADT $element): string
44 {
45 return $element->getLatitude() . "#" . $element->getLongitude() . "#" . $element->getZoom();
46 }
47
48 public function importValueFromXML(string $a_cdata): void
49 {
50 $parts = explode("#", $a_cdata);
51 if (count($parts) == 3) {
52 $adt = $this->getADT();
53 $adt->setLatitude((float) $parts[0]);
54 $adt->setLongitude((float) $parts[1]);
55 $adt->setZoom($parts[2]);
56 }
57 }
58
63 public function getLuceneSearchString($a_value): string
64 {
65 // #14777 - currently not supported
66 return '';
67 }
68}
ADT definition base class.
ADT base class.
Definition: class.ilADT.php:26
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:61