ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilADTExternalLinkPresentationBridge Class Reference

external link presentation bridge More...

+ Inheritance diagram for ilADTExternalLinkPresentationBridge:
+ Collaboration diagram for ilADTExternalLinkPresentationBridge:

Public Member Functions

 getHTML ()
 Get html. More...
 
 getSortable ()
 Get soratable. More...
 
- Public Member Functions inherited from ilADTPresentationBridge
 __construct (ilADT $a_adt)
 Constructor. More...
 
 getADT ()
 Get ADT. More...
 
 getList ()
 Get list presentation. More...
 
 getHTML ()
 Get HTML presentation. More...
 
 getSortable ()
 Get sortable value presentation. More...
 
 setDecoratorCallBack ($a_callback)
 Set decorator callback. More...
 

Protected Member Functions

 isValidADT (ilADT $a_adt)
 Is valid type. More...
 
- Protected Member Functions inherited from ilADTPresentationBridge
 isValidADT (ilADT $a_adt)
 Check if given ADT is valid. More...
 
 setADT (ilADT $a_adt)
 Set ADT. More...
 
 decorate ($a_value)
 Decorate value. More...
 

Additional Inherited Members

- Protected Attributes inherited from ilADTPresentationBridge
 $adt
 
 $decorator
 

Detailed Description

external link presentation bridge

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om

Definition at line 11 of file class.ilADTExternalLinkPresentationBridge.php.

Member Function Documentation

◆ getHTML()

ilADTExternalLinkPresentationBridge::getHTML ( )

Get html.

Returns
string

Definition at line 28 of file class.ilADTExternalLinkPresentationBridge.php.

References ilADTPresentationBridge\decorate(), ilADTPresentationBridge\getADT(), and ilUtil\makeClickable().

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  }
decorate($a_value)
Decorate value.
static makeClickable($a_text, $detectGotoLinks=false)
makeClickable In Texten enthaltene URLs und Mail-Adressen klickbar machen
+ Here is the call graph for this function:

◆ getSortable()

ilADTExternalLinkPresentationBridge::getSortable ( )

Get soratable.

Returns
type

Definition at line 48 of file class.ilADTExternalLinkPresentationBridge.php.

References ilADTPresentationBridge\getADT().

49  {
50  if (!$this->getADT()->isNull()) {
51  return $this->getADT()->getUrl();
52  }
53  }
+ Here is the call graph for this function:

◆ isValidADT()

ilADTExternalLinkPresentationBridge::isValidADT ( ilADT  $a_adt)
protected

Is valid type.

Parameters
ilADT$a_adt
Returns
bool

Definition at line 19 of file class.ilADTExternalLinkPresentationBridge.php.

20  {
21  return $a_adt instanceof ilADTExternalLink;
22  }

The documentation for this class was generated from the following file: