ILIAS  release_8 Revision v8.24
ilADTInternalLinkPresentationBridge Class Reference

external link presentation bridge More...

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

Public Member Functions

 __construct (ilADT $a_adt)
 
 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...
 

Protected Attributes

ilAccessHandler $access
 
ilObjUser $user
 
- 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 12 of file class.ilADTInternalLinkPresentationBridge.php.

Constructor & Destructor Documentation

◆ __construct()

ilADTInternalLinkPresentationBridge::__construct ( ilADT  $a_adt)

Reimplemented from ilADTPresentationBridge.

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

19 {
20 global $DIC;
21 parent::__construct($a_adt);
22
23 $this->access = $DIC->access();
24 $this->user = $DIC->user();
25 }
global $DIC
Definition: feed.php:28
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), ILIAS\Repository\access(), and ILIAS\Repository\user().

+ Here is the call graph for this function:

Member Function Documentation

◆ getHTML()

ilADTInternalLinkPresentationBridge::getHTML ( )

Get html.

Returns
string

Reimplemented from ilADTPresentationBridge.

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

41 : string
42 {
43 if ($this->getADT()->isNull()) {
44 return '';
45 }
46
47 if (!$this->getADT()->isValid()) {
48 return '';
49 }
50
51 if ($this->access->checkAccess('read', '', $this->getADT()->getTargetRefId())) {
52 $title = ilObject::_lookupTitle(ilObject::_lookupObjId($this->getADT()->getTargetRefId()));
53 $link = ilLink::_getLink($this->getADT()->getTargetRefId());
54
55 return $this->decorate(
56 '<a href="' . $link . '">' . $title . '</a>'
57 );
58 }
59 if ($this->access->checkAccess('visible', '', $this->getADT()->getTargetRefId())) {
60 $title = ilObject::_lookupTitle(ilObject::_lookupObjId($this->getADT()->getTargetRefId()));
61
62 return $this->decorate($title);
63 }
64 return '';
65 }
static _lookupObjId(int $ref_id)
static _lookupTitle(int $obj_id)

References ilLink\_getLink(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), ILIAS\Repository\access(), ilADTPresentationBridge\decorate(), and ilADTPresentationBridge\getADT().

+ Here is the call graph for this function:

◆ getSortable()

ilADTInternalLinkPresentationBridge::getSortable ( )

Get soratable.

Returns

Reimplemented from ilADTPresentationBridge.

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

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

References ilADTPresentationBridge\getADT().

+ Here is the call graph for this function:

◆ isValidADT()

ilADTInternalLinkPresentationBridge::isValidADT ( ilADT  $a_adt)
protected

Is valid type.

Parameters
ilADT$a_adt
Returns
bool

Reimplemented from ilADTPresentationBridge.

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

32 : bool
33 {
34 return $a_adt instanceof ilADTInternalLink;
35 }

Field Documentation

◆ $access

ilAccessHandler ilADTInternalLinkPresentationBridge::$access
protected

◆ $user

ilObjUser ilADTInternalLinkPresentationBridge::$user
protected

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