ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
class.ilAdvancedMDFieldDefinitionAddress.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/Types/class.ilAdvancedMDFieldDefinitionGroupBased.php";
5
15{
16 public function getType()
17 {
18 return self::TYPE_ADDRESS;
19 }
20
21 public function getADTGroup()
22 {
23 $def = ilADTFactory::getInstance()->getDefinitionInstanceByType("Group");
24
25 $street = ilADTFactory::getInstance()->getDefinitionInstanceByType("Text");
26 $def->AddElement("street", $street);
27
28 $city = ilADTFactory::getInstance()->getDefinitionInstanceByType("Text");
29 $def->AddElement("city", $city);
30
31 $loc = ilADTFactory::getInstance()->getDefinitionInstanceByType("Location");
32 $def->AddElement("location", $loc);
33
34 return $def;
35 }
36
37 public function getTitles()
38 {
39 global $lng;
40
41 return array(
42 "street" => $lng->txt("street")
43 ,"city" => $lng->txt("city")
44 ,"location" => $lng->txt("location")
45 );
46 }
47}
An exception for terminatinating execution or to throw for unit testing.
static getInstance()
Get singleton.
$lng