ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilLSViewFactory Class Reference

Build a view. More...

+ Collaboration diagram for ilLSViewFactory:

Public Member Functions

 __construct (ilKioskModeService $kiosk_mode_service, ilLanguage $lng, ilAccess $access)
 
 getViewFor (LSLearnerItem $item)
 

Protected Member Functions

 getInstanceByRefId (int $ref_id)
 
 getLegacyViewFor (ilObject $obj)
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilLSViewFactory::__construct ( ilKioskModeService  $kiosk_mode_service,
ilLanguage  $lng,
ilAccess  $access 
)

Definition at line 12 of file class.ilLSViewFactory.php.

References $lng.

16  {
17  $this->kiosk_mode_service = $kiosk_mode_service;
18  $this->lng = $lng;
19  $this->access = $access;
20  }
$lng

Member Function Documentation

◆ getInstanceByRefId()

ilLSViewFactory::getInstanceByRefId ( int  $ref_id)
protected

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

References ilObjectFactory\getInstanceByRefId().

Referenced by getViewFor().

32  : ilObject
33  {
34  return ilObjectFactory::getInstanceByRefId($ref_id, false);
35  }
static getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getLegacyViewFor()

ilLSViewFactory::getLegacyViewFor ( ilObject  $obj)
protected

Definition at line 38 of file class.ilLSViewFactory.php.

Referenced by getViewFor().

39  {
40  $view = new ilLegacyKioskModeView(
41  $obj,
42  $this->lng,
43  $this->access
44  );
45  return $view;
46  }
Class ilLegacyKioskModeView.
+ Here is the caller graph for this function:

◆ getViewFor()

ilLSViewFactory::getViewFor ( LSLearnerItem  $item)

Definition at line 22 of file class.ilLSViewFactory.php.

References getInstanceByRefId(), getLegacyViewFor(), LSItem\getRefId(), and LSItem\getType().

23  {
24  $obj = $this->getInstanceByRefId($item->getRefId());
25  if ($this->kiosk_mode_service->hasKioskMode($item->getType())) {
26  return $this->kiosk_mode_service->getViewFor($obj);
27  } else {
28  return $this->getLegacyViewFor($obj);
29  }
30  }
getRefId()
Definition: LSItem.php:129
getInstanceByRefId(int $ref_id)
getLegacyViewFor(ilObject $obj)
A kiosk mode view on a certain object.
Definition: View.php:13
getType()
Definition: LSItem.php:73
+ Here is the call graph for this function:

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