ILIAS  release_8 Revision v8.23
class.ilAdvancedMDFieldDefinitionExternalLink.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 
12 {
13  public function getType(): int
14  {
15  return self::TYPE_EXTERNAL_LINK;
16  }
17 
18  protected function initADTDefinition(): ilADTDefinition
19  {
20  return ilADTFactory::getInstance()->getDefinitionInstanceByType("ExternalLink");
21  }
22 
23  public function getValueForXML(ilADT $element): string
24  {
25  return $element->getTitle() . '#' . $element->getUrl();
26  }
27 
28  public function importValueFromXML(string $a_cdata): void
29  {
30  $parts = explode("#", $a_cdata);
31  if (count($parts) == 2) {
32  $adt = $this->getADT();
33  $adt->setTitle($parts[0]);
34  $adt->setUrl($parts[1]);
35  }
36  }
37 }
if($clientAssertionType !='urn:ietf:params:oauth:client-assertion-type:jwt-bearer'|| $grantType !='client_credentials') $parts
Definition: ltitoken.php:64
ADT base class.
Definition: class.ilADT.php:11
ADT definition base class.