ILIAS  release_7 Revision v7.30-3-g800a261c036
class.ilAdvancedMDFieldDefinitionExternalLink.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
11{
16 public function getType()
17 {
19 }
20
21
26 protected function initADTDefinition()
27 {
28 return ilADTFactory::getInstance()->getDefinitionInstanceByType("ExternalLink");
29 }
30
35 public function getValueForXML(\ilADT $element)
36 {
37 return $element->getTitle() . '#' . $element->getUrl();
38 }
39
44 public function importValueFromXML($a_cdata)
45 {
46 $parts = explode("#", $a_cdata);
47 if (count($parts) == 2) {
48 $adt = $this->getADT();
49 $adt->setTitle($parts[0]);
50 $adt->setUrl($parts[1]);
51 }
52 }
53}
An exception for terminatinating execution or to throw for unit testing.
static getInstance()
Get singleton.
ADT base class.
Definition: class.ilADT.php:12