ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilAdvancedMDFieldDefinitionAddress.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 /* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
5 
13 {
14  public function getType(): int
15  {
16  return self::TYPE_ADDRESS;
17  }
18 
19  public function getADTGroup(): ilADTDefinition
20  {
21  $def = ilADTFactory::getInstance()->getDefinitionInstanceByType("Group");
22 
23  $street = ilADTFactory::getInstance()->getDefinitionInstanceByType("Text");
24  $def->addElement("street", $street);
25 
26  $city = ilADTFactory::getInstance()->getDefinitionInstanceByType("Text");
27  $def->addElement("city", $city);
28 
29  $loc = ilADTFactory::getInstance()->getDefinitionInstanceByType("Location");
30  $def->addElement("location", $loc);
31 
32  return $def;
33  }
34 
35  public function getTitles(): array
36  {
37  global $lng;
38 
39  return array(
40  "street" => $lng->txt("street")
41  ,
42  "city" => $lng->txt("city")
43  ,
44  "location" => $lng->txt("location")
45  );
46  }
47 }
ADT definition base class.