ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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 
)

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.

77 : string
78 {
79 $class = $this->obj_definition->getClassName($object_type);
80 return "il" . $class . "KioskModeView";
81 }

Referenced by getViewFor(), and hasKioskMode().

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

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 }
hasKioskMode(string $object_type)
Check if objects of a certain type provides kiosk mode in general.
getClassNameForType(string $object_type)
Base class to be implemented and put in class-directory of module with the name il$MODULEKioskModeVie...

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

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

68 : bool
69 {
70 $class_name = $this->getClassNameForType($object_type);
71 return class_exists($class_name);
72 }

References getClassNameForType().

Referenced by getViewFor().

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