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

external link presentation bridge More...

+ Inheritance diagram for ilADTInternalLinkPresentationBridge:
+ Collaboration diagram for ilADTInternalLinkPresentationBridge:

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.ilADTInternalLinkPresentationBridge.php.

Member Function Documentation

◆ getHTML()

ilADTInternalLinkPresentationBridge::getHTML ( )

Get html.

Returns
string

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

References $GLOBALS, $title, ilLink\_getLink(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), ilADTPresentationBridge\decorate(), and ilADTPresentationBridge\getADT().

29  {
30  if ($this->getADT()->isNull()) {
31  return;
32  }
33 
34  if (!$this->getADT()->isValid()) {
35  return;
36  }
37 
38  $access = $GLOBALS['DIC']->access();
39  $user = $GLOBALS['DIC']->user();
40 
41  if ($access->checkAccess('read', '', $this->getADT()->getTargetRefId())) {
42  $title = ilObject::_lookupTitle(ilObject::_lookupObjId($this->getADT()->getTargetRefId()));
43  $link = ilLink::_getLink($this->getADT()->getTargetRefId());
44 
45  return $this->decorate(
46  '<a href="' . $link . '">' . $title . '</a>'
47  );
48  }
49  if ($access->checkAccess('visible', '', $this->getADT()->getTargetRefId())) {
50  $title = ilObject::_lookupTitle(ilObject::_lookupObjId($this->getADT()->getTargetRefId()));
51 
52  return $this->decorate($title);
53  }
54  return;
55  }
decorate($a_value)
Decorate value.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
static _lookupTitle($a_id)
lookup object title
static _lookupObjId($a_id)
+ Here is the call graph for this function:

◆ getSortable()

ilADTInternalLinkPresentationBridge::getSortable ( )

Get soratable.

Returns
type

Definition at line 61 of file class.ilADTInternalLinkPresentationBridge.php.

References ilADTPresentationBridge\getADT().

62  {
63  if (!$this->getADT()->isNull()) {
64  return $this->getADT()->getTargetRefId();
65  }
66  }
+ Here is the call graph for this function:

◆ isValidADT()

ilADTInternalLinkPresentationBridge::isValidADT ( ilADT  $a_adt)
protected

Is valid type.

Parameters
ilADT$a_adt
Returns
bool

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

20  {
21  return $a_adt instanceof ilADTInternalLink;
22  }

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