ILIAS  release_8 Revision v8.19-1-g4e8f2f9140c
All Data Structures Namespaces Files Functions Variables Modules Pages
ilKioskModeService Class Reference

Central entry point for users of the service. More...

+ Collaboration diagram for ilKioskModeService:

Public Member Functions

 __construct (ilCtrl $ctrl, ilLanguage $language, ilAccess $access, ilObjectDefinition $obj_definition)
 
 getViewFor (ilObject $object)
 Try to get a kiosk mode view for the given object. More...
 
 hasKioskMode (string $object_type)
 Check if objects of a certain type provides kiosk mode in general. More...
 

Protected Member Functions

 getClassNameForType (string $object_type)
 

Protected Attributes

ilCtrl $ctrl
 
ilLanguage $language
 
ilAccess $access
 
ilObjectDefinition $obj_definition
 

Detailed Description

Central entry point for users of the service.

Definition at line 10 of file class.ilKioskModeService.php.

Constructor & Destructor Documentation

◆ __construct()

ilKioskModeService::__construct ( ilCtrl  $ctrl,
ilLanguage  $language,
ilAccess  $access,
ilObjectDefinition  $obj_definition 
)

Member Function Documentation

◆ getClassNameForType()

ilKioskModeService::getClassNameForType ( string  $object_type)
protected
Returns
string classname of type-specific kiosk view.

Definition at line 63 of file class.ilKioskModeService.php.

Referenced by getViewFor(), and hasKioskMode().

63  : string
64  {
65  $class = $this->obj_definition->getClassName($object_type);
66  return "il" . $class . "KioskModeView";
67  }
+ Here is the caller graph for this function:

◆ getViewFor()

ilKioskModeService::getViewFor ( ilObject  $object)

Try to get a kiosk mode view for the given object.

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

References ILIAS\Repository\access(), ILIAS\Repository\ctrl(), getClassNameForType(), ilObject\getType(), hasKioskMode(), and ILIAS\UI\examples\Symbol\Glyph\Language\language().

33  {
34  $object_type = $object->getType();
35  if (!$this->hasKioskMode($object_type)) {
36  return null;
37  }
38 
39  $class_name = $this->getClassNameForType($object_type);
40 
41  return new $class_name(
42  $object,
43  $this->ctrl,
44  $this->language,
45  $this->access
46  );
47  }
Base class to be implemented and put in class-directory of module with the name il$MODULEKioskModeVie...
getClassNameForType(string $object_type)
hasKioskMode(string $object_type)
Check if objects of a certain type provides kiosk mode in general.
+ Here is the call graph for this function:

◆ hasKioskMode()

ilKioskModeService::hasKioskMode ( string  $object_type)

Check if objects of a certain type provides kiosk mode in general.

Parameters
string$object_typeneeds to be a valid object type

Definition at line 54 of file class.ilKioskModeService.php.

References getClassNameForType().

Referenced by getViewFor().

54  : bool
55  {
56  $class_name = $this->getClassNameForType($object_type);
57  return class_exists($class_name);
58  }
getClassNameForType(string $object_type)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $access

ilAccess ilKioskModeService::$access
protected

Definition at line 14 of file class.ilKioskModeService.php.

Referenced by __construct().

◆ $ctrl

ilCtrl ilKioskModeService::$ctrl
protected

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

Referenced by __construct().

◆ $language

ilLanguage ilKioskModeService::$language
protected

Definition at line 13 of file class.ilKioskModeService.php.

Referenced by __construct().

◆ $obj_definition

ilObjectDefinition ilKioskModeService::$obj_definition
protected

Definition at line 15 of file class.ilKioskModeService.php.

Referenced by __construct().


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