ILIAS  trunk Revision v11.0_alpha-1749-g1a06bdef097
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator 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 24 of file class.ilKioskModeService.php.

Constructor & Destructor Documentation

◆ __construct()

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

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

References $access, $ctrl, $language, $obj_definition, ILIAS\Repository\access(), ILIAS\Repository\ctrl(), and ILIAS\UI\examples\Symbol\Glyph\Language\language().

36  {
37  $this->ctrl = $ctrl;
38  $this->language = $language;
39  $this->access = $access;
40  $this->obj_definition = $obj_definition;
41  }
ilObjectDefinition $obj_definition
language()
description: > Example for rendring a language glyph.
Definition: language.php:41
+ Here is the call graph for this function:

Member Function Documentation

◆ getClassNameForType()

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

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

Referenced by getViewFor(), and hasKioskMode().

77  : string
78  {
79  $class = $this->obj_definition->getClassName($object_type);
80  return "il" . $class . "KioskModeView";
81  }
+ 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 46 of file class.ilKioskModeService.php.

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

47  {
48  $object_type = $object->getType();
49  if (!$this->hasKioskMode($object_type)) {
50  return null;
51  }
52 
53  $class_name = $this->getClassNameForType($object_type);
54 
55  return new $class_name(
56  $object,
57  $this->ctrl,
58  $this->language,
59  $this->access
60  );
61  }
Base class to be implemented and put in class-directory of module with the name il$MODULEKioskModeVie...
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
getClassNameForType(string $object_type)
hasKioskMode(string $object_type)
Check if objects of a certain type provides kiosk mode in general.
language()
description: > Example for rendring a language glyph.
Definition: language.php:41
+ 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 68 of file class.ilKioskModeService.php.

References getClassNameForType().

Referenced by getViewFor().

68  : bool
69  {
70  $class_name = $this->getClassNameForType($object_type);
71  return class_exists($class_name);
72  }
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 28 of file class.ilKioskModeService.php.

Referenced by __construct().

◆ $ctrl

ilCtrl ilKioskModeService::$ctrl
protected

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

Referenced by __construct().

◆ $language

ilLanguage ilKioskModeService::$language
protected

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

Referenced by __construct().

◆ $obj_definition

ilObjectDefinition ilKioskModeService::$obj_definition
protected

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

Referenced by __construct().


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