ILIAS  release_8 Revision v8.24
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.

34 {
35 $this->kiosk_mode_service = $kiosk_mode_service;
36 $this->lng = $lng;
37 $this->access = $access;
38 }
ilKioskModeService $kiosk_mode_service

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

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

50 : ?\ilObject
51 {
53 }
static getInstanceByRefId(int $ref_id, bool $stop_on_error=true)
get an instance of an Ilias object by reference id
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$ref_id
Definition: ltiauth.php:67

References $ref_id, and ilObjectFactory\getInstanceByRefId().

Referenced by getViewFor().

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

57 {
58 return new ilLegacyKioskModeView(
59 $obj,
60 $this->lng,
61 $this->access
62 );
63 }

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.

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
getType()
Definition: LSItem.php:55
getInstanceByRefId(int $ref_id)
getLegacyViewFor(ilObject $obj)
A kiosk mode view on a certain object.
Definition: View.php:17

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

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