ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilLSViewFactory Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. 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)
 

Protected Attributes

ilKioskModeService $kiosk_mode_service
 
ilLanguage $lng
 
ilAccess $access
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Build a view.

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

Constructor & Destructor Documentation

◆ __construct()

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

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

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

34  {
35  $this->kiosk_mode_service = $kiosk_mode_service;
36  $this->lng = $lng;
37  $this->access = $access;
38  }
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 50 of file class.ilLSViewFactory.php.

References ilObjectFactory\getInstanceByRefId().

Referenced by getViewFor().

50  : ?\ilObject
51  {
53  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$ref_id
Definition: ltiauth.php:67
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 56 of file class.ilLSViewFactory.php.

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

Referenced by getViewFor().

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

◆ getViewFor()

ilLSViewFactory::getViewFor ( LSLearnerItem  $item)

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

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

41  {
42  $obj = $this->getInstanceByRefId($item->getRefId());
43  if ($this->kiosk_mode_service->hasKioskMode($item->getType())) {
44  return $this->kiosk_mode_service->getViewFor($obj);
45  } else {
46  return $this->getLegacyViewFor($obj);
47  }
48  }
getRefId()
Definition: LSItem.php:90
getInstanceByRefId(int $ref_id)
getLegacyViewFor(ilObject $obj)
getType()
Definition: LSItem.php:55
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

Field Documentation

◆ $access

ilAccess ilLSViewFactory::$access
protected

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

Referenced by __construct().

◆ $kiosk_mode_service

ilKioskModeService ilLSViewFactory::$kiosk_mode_service
protected

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

Referenced by __construct().

◆ $lng

ilLanguage ilLSViewFactory::$lng
protected

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

Referenced by __construct().


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