ILIAS  release_8 Revision v8.24
class.ilLSViewFactory.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
25{
27 protected ilLanguage $lng;
28 protected ilAccess $access;
29
30 public function __construct(
34 ) {
35 $this->kiosk_mode_service = $kiosk_mode_service;
36 $this->lng = $lng;
37 $this->access = $access;
38 }
39
40 public function getViewFor(LSLearnerItem $item): ILIAS\KioskMode\View
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 }
49
50 protected function getInstanceByRefId(int $ref_id): ?\ilObject
51 {
53 }
54
55
57 {
58 return new ilLegacyKioskModeView(
59 $obj,
60 $this->lng,
61 $this->access
62 );
63 }
64}
getRefId()
Definition: LSItem.php:90
getType()
Definition: LSItem.php:55
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Central entry point for users of the service.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getInstanceByRefId(int $ref_id)
ilKioskModeService $kiosk_mode_service
getLegacyViewFor(ilObject $obj)
__construct(ilKioskModeService $kiosk_mode_service, ilLanguage $lng, ilAccess $access)
getViewFor(LSLearnerItem $item)
language handling
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
Class ChatMainBarProvider \MainMenu\Provider.