ILIAS  trunk Revision v11.0_alpha-1715-g7fc467680fb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilLSViewFactory Class Reference

Build a view. More...

+ Collaboration diagram for ilLSViewFactory:

Public Member Functions

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

Protected Member Functions

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

Protected Attributes

ilKioskModeService $kiosk_mode_service
 
ilLanguage $lng
 
ilAccess $access
 
LOMServices $lom_services
 

Detailed Description

Build a view.

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

Constructor & Destructor Documentation

◆ __construct()

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

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

References $access, $kiosk_mode_service, $lng, $lom_services, ILIAS\Repository\access(), and ILIAS\Repository\lng().

38  {
39  $this->kiosk_mode_service = $kiosk_mode_service;
40  $this->lng = $lng;
41  $this->access = $access;
42  $this->lom_services = $lom_services;
43  }
ilKioskModeService $kiosk_mode_service
+ Here is the call graph for this function:

Member Function Documentation

◆ getInstanceByRefId()

ilLSViewFactory::getInstanceByRefId ( int  $ref_id)
protected

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

References ilObjectFactory\getInstanceByRefId().

Referenced by getViewFor().

55  : ?\ilObject
56  {
58  }
Class ilObject Basic functions for all objects.
$ref_id
Definition: ltiauth.php:65
static getInstanceByRefId(int $ref_id, bool $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 61 of file class.ilLSViewFactory.php.

References ILIAS\Repository\access(), and ILIAS\Repository\lng().

Referenced by getViewFor().

62  {
63  return new ilLegacyKioskModeView(
64  $obj,
65  $this->lng,
66  $this->access,
67  $this->lom_services
68  );
69  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getViewFor()

ilLSViewFactory::getViewFor ( LSLearnerItem  $item)

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

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

46  {
47  $obj = $this->getInstanceByRefId($item->getRefId());
48  if ($this->kiosk_mode_service->hasKioskMode($item->getType())) {
49  return $this->kiosk_mode_service->getViewFor($obj);
50  } else {
51  return $this->getLegacyViewFor($obj);
52  }
53  }
getRefId()
Definition: LSItem.php:93
getInstanceByRefId(int $ref_id)
getLegacyViewFor(ilObject $obj)
getType()
Definition: LSItem.php:58
+ Here is the call graph for this function:

Field Documentation

◆ $access

ilAccess ilLSViewFactory::$access
protected

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

Referenced by __construct().

◆ $kiosk_mode_service

ilKioskModeService ilLSViewFactory::$kiosk_mode_service
protected

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

Referenced by __construct().

◆ $lng

ilLanguage ilLSViewFactory::$lng
protected

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

Referenced by __construct().

◆ $lom_services

LOMServices ilLSViewFactory::$lom_services
protected

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

Referenced by __construct().


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