ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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 26 of file class.ilADTInternalLinkPresentationBridge.php.

Constructor & Destructor Documentation

◆ __construct()

ilADTInternalLinkPresentationBridge::__construct ( ilADT  $a_adt)

Reimplemented from ilADTPresentationBridge.

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

33 {
34 global $DIC;
35 parent::__construct($a_adt);
36
37 $this->access = $DIC->access();
38 $this->user = $DIC->user();
39 }
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26

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 55 of file class.ilADTInternalLinkPresentationBridge.php.

55 : string
56 {
57 if ($this->getADT()->isNull()) {
58 return '';
59 }
60
61 if (!$this->getADT()->isValid()) {
62 return '';
63 }
64
65 if ($this->access->checkAccess('read', '', $this->getADT()->getTargetRefId())) {
66 $title = ilObject::_lookupTitle(ilObject::_lookupObjId($this->getADT()->getTargetRefId()));
67 $link = ilLink::_getLink($this->getADT()->getTargetRefId());
68
69 return $this->decorate(
70 '<a href="' . $link . '">' . $title . '</a>'
71 );
72 }
73 if ($this->access->checkAccess('visible', '', $this->getADT()->getTargetRefId())) {
74 $title = ilObject::_lookupTitle(ilObject::_lookupObjId($this->getADT()->getTargetRefId()));
75
76 return $this->decorate($title);
77 }
78 return '';
79 }
static _lookupObjId(int $ref_id)
static _lookupTitle(int $obj_id)

References 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 85 of file class.ilADTInternalLinkPresentationBridge.php.

86 {
87 if (!$this->getADT()->isNull()) {
88 return $this->getADT()->getTargetRefId();
89 }
90 return 0;
91 }

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 46 of file class.ilADTInternalLinkPresentationBridge.php.

46 : bool
47 {
48 return $a_adt instanceof ilADTInternalLink;
49 }

Field Documentation

◆ $access

ilAccessHandler ilADTInternalLinkPresentationBridge::$access
protected

◆ $user

ilObjUser ilADTInternalLinkPresentationBridge::$user
protected

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