ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilADTExternalLinkPresentationBridge.php
Go to the documentation of this file.
1 <?php
2 
3 /* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
4 
12 {
13 
19  protected function isValidADT(ilADT $a_adt)
20  {
21  return $a_adt instanceof ilADTExternalLink;
22  }
23 
28  public function getHTML()
29  {
30  if ($this->getADT()->isNull()) {
31  return;
32  }
33  if (!strlen($this->getADT()->getTitle())) {
34  $presentation_value = $this->getADT()->getUrl();
35  $presentation_clickable = ilUtil::makeClickable($presentation_value);
36  return $this->decorate($presentation_clickable);
37  }
38 
39  return $this->decorate(
40  '<a target="_blank" href="' . $this->getADT()->getUrl() . '">' . $this->getADT()->getTitle() . '</a>'
41  );
42  }
43 
48  public function getSortable()
49  {
50  if (!$this->getADT()->isNull()) {
51  return $this->getADT()->getUrl();
52  }
53  }
54 }
decorate($a_value)
Decorate value.
ADT base class.
Definition: class.ilADT.php:11
static makeClickable($a_text, $detectGotoLinks=false)
makeClickable In Texten enthaltene URLs und Mail-Adressen klickbar machen
ADT presentation bridge base class.