ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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)
 
 getADT ()
 
 getList ()
 
 getHTML ()
 
 getSortable ()
 Get sortable value presentation. More...
 
 setDecoratorCallBack (?array $a_callback)
 Takes as input an array consisting of the object that the method that should be called back to belongs to, and a string with the name of the method. More...
 

Protected Member Functions

 isValidADT (ilADT $a_adt)
 Is valid type. More...
 
- Protected Member Functions inherited from ilADTPresentationBridge
 isValidADT (ilADT $a_adt)
 
 setADT (ilADT $a_adt)
 
 decorate ($a_value)
 Decorate value. More...
 

Additional Inherited Members

- Protected Attributes inherited from ilADTPresentationBridge
ilADT $adt
 
 $decorator
 
ilLanguage $lng
 

Detailed Description

external link presentation bridge

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

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

Member Function Documentation

◆ getHTML()

ilADTExternalLinkPresentationBridge::getHTML ( )

Get html.

Returns
string

Reimplemented from ilADTPresentationBridge.

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

42 : string
43 {
44 if ($this->getADT()->isNull()) {
45 return '';
46 }
47
48 $presentation_value = $this->getADT()->getUrl();
49 $presentation_clickable = ilUtil::makeClickable($presentation_value);
50
51 if (!strlen((string) $this->getADT()->getTitle())) {
52 return $this->decorate($presentation_clickable);
53 }
54
55 /*
56 * BT 35874: Until the refinery (or some other service) can provide
57 * links with titles, we have to do some surgery here.
58 */
59 $presentation_clickable = preg_replace(
60 '/>.*<\/a>/',
61 '>' . $this->getADT()->getTitle() . '</a>',
62 $presentation_clickable
63 );
64 return $this->decorate($presentation_clickable);
65 }
static makeClickable(string $a_text, bool $detectGotoLinks=false, ?string $ilias_http_path=null)

References ilADTPresentationBridge\decorate(), ilADTPresentationBridge\getADT(), ILIAS\GlobalScreen\Scope\Footer\Factory\getTitle(), and ilUtil\makeClickable().

+ Here is the call graph for this function:

◆ getSortable()

ilADTExternalLinkPresentationBridge::getSortable ( )

Get soratable.

Returns

Reimplemented from ilADTPresentationBridge.

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

72 {
73 if (!$this->getADT()->isNull()) {
74 return $this->getADT()->getUrl();
75 }
76 return '';
77 }

References ilADTPresentationBridge\getADT().

+ Here is the call graph for this function:

◆ isValidADT()

ilADTExternalLinkPresentationBridge::isValidADT ( ilADT  $a_adt)
protected

Is valid type.

Parameters
ilADT$a_adt
Returns
bool

Reimplemented from ilADTPresentationBridge.

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

33 : bool
34 {
35 return $a_adt instanceof ilADTExternalLink;
36 }

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