ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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 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...
 

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

References lookupTargetId().

35  {
36  $target_obj_id = $this->lookupTargetId();
37  $this->icon = $this->factory->getByObjId($target_obj_id);
38  }
lookupTargetId()
Lookup target id of container reference.
+ 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.

References ilContainerReference\_lookupTargetId().

Referenced by init().

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
+ 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: