ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ilObjectReferenceCustomIconPresenter Class Reference

Class ilObjectCustomIconPresenter. More...

+ Inheritance diagram for ilObjectReferenceCustomIconPresenter:
+ Collaboration diagram for ilObjectReferenceCustomIconPresenter:

Public Member Functions

 __construct (int $obj_id, \ilObjectCustomIconFactory $factory)
 ilObjectReferenceCustomIconPresenter constructor. More...
 
 init ()
 Init \ilObjectCustomIconPresenter If the target is invalid the icon instance creation is based on the reference object obj_id. More...
 
 exists ()
 
Returns
bool
More...
 
 getFullPath ()
 
Returns
string
More...
 
 exists ()
 
 getFullPath ()
 

Protected Member Functions

 lookupTargetId ()
 Lookup target id of container reference. More...
 

Private Attributes

 $factory = null
 
 $icon = null
 
 $obj_id = 0
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilObjectReferenceCustomIconPresenter::__construct ( int  $obj_id,
\ilObjectCustomIconFactory  $factory 
)

Member Function Documentation

◆ exists()

ilObjectReferenceCustomIconPresenter::exists ( )

Returns
bool

Implements ilObjectCustomIconPresenter.

Definition at line 45 of file class.ilObjectReferenceCustomIconPresenter.php.

45 : bool
46 {
47 return $this->icon->exists();
48 }

◆ getFullPath()

ilObjectReferenceCustomIconPresenter::getFullPath ( )

Returns
string

Implements ilObjectCustomIconPresenter.

Definition at line 53 of file class.ilObjectReferenceCustomIconPresenter.php.

53 : string
54 {
55 return $this->icon->getFullPath();
56 }

◆ init()

ilObjectReferenceCustomIconPresenter::init ( )

Init \ilObjectCustomIconPresenter If the target is invalid the icon instance creation is based on the reference object obj_id.

Definition at line 34 of file class.ilObjectReferenceCustomIconPresenter.php.

35 {
36 $target_obj_id = $this->lookupTargetId();
37 $this->icon = $this->factory->getByObjId($target_obj_id);
38 }
lookupTargetId()
Lookup target id of container reference.

References lookupTargetId().

+ Here is the call graph for this function:

◆ lookupTargetId()

ilObjectReferenceCustomIconPresenter::lookupTargetId ( )
protected

Lookup target id of container reference.

Returns
int

Definition at line 62 of file class.ilObjectReferenceCustomIconPresenter.php.

62 : int
63 {
64 $target_obj_id = ilContainerReference::_lookupTargetId($this->obj_id);
65 return $target_obj_id;
66 }
static _lookupTargetId($a_obj_id)
lookup target id

References ilContainerReference\_lookupTargetId().

Referenced by init().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $factory

ilObjectReferenceCustomIconPresenter::$factory = null
private

Definition at line 10 of file class.ilObjectReferenceCustomIconPresenter.php.

Referenced by __construct().

◆ $icon

ilObjectReferenceCustomIconPresenter::$icon = null
private

◆ $obj_id

ilObjectReferenceCustomIconPresenter::$obj_id = 0
private

Definition at line 16 of file class.ilObjectReferenceCustomIconPresenter.php.

Referenced by __construct().


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