ILIAS  release_7 Revision v7.30-3-g800a261c036
ILIAS\GlobalScreen\Client\CallbackHandler Class Reference
+ Collaboration diagram for ILIAS\GlobalScreen\Client\CallbackHandler:

Public Member Functions

 __construct ()
 
 run ()
 

Data Fields

const KEY_ITEM = 'item'
 

Protected Attributes

 $wrapper
 
 $refinery
 
 $ctrl
 
 $global_screen
 

Private Member Functions

 resolveCallback (isToolItem $item)
 
 getIdentification ()
 

Private Attributes

const TARGET_SCRIPT = "/ilias.php"
 

Detailed Description

Definition at line 29 of file CallbackHandler.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\GlobalScreen\Client\CallbackHandler::__construct ( )

Definition at line 53 of file CallbackHandler.php.

References $DIC, and ilInitialisation\initILIAS().

54  {
56  global $DIC;
57  $this->ctrl = $DIC->ctrl();
58  $this->wrapper = $DIC->http()->wrapper();
59  $this->refinery = $DIC->refinery();
60  $this->global_screen = $DIC->globalScreen();
61  }
static initILIAS()
ilias initialisation
global $DIC
Definition: goto.php:24
+ Here is the call graph for this function:

Member Function Documentation

◆ getIdentification()

ILIAS\GlobalScreen\Client\CallbackHandler::getIdentification ( )
private

Definition at line 89 of file CallbackHandler.php.

Referenced by ILIAS\GlobalScreen\Client\CallbackHandler\run().

89  : IdentificationInterface
90  {
91  $hashed = $this->wrapper->query()->has(self::KEY_ITEM)
92  ? $this->wrapper->query()->retrieve(self::KEY_ITEM, $this->refinery->to()->string())
93  : '';
94 
95  $unhashed = $this->unhash($hashed);
96 
97  return $this->global_screen->identification()->fromSerializedIdentification($unhashed);
98  }
+ Here is the caller graph for this function:

◆ resolveCallback()

ILIAS\GlobalScreen\Client\CallbackHandler::resolveCallback ( isToolItem  $item)
private

Definition at line 81 of file CallbackHandler.php.

References ILIAS\GlobalScreen\Scope\Tool\Factory\isToolItem\getCloseCallback(), and ILIAS\GlobalScreen\Scope\Tool\Factory\isToolItem\hasCloseCallback().

Referenced by ILIAS\GlobalScreen\Client\CallbackHandler\run().

81  : \Closure
82  {
83  return $item->hasCloseCallback()
84  ? $item->getCloseCallback()
85  : static function () : void {
86  };
87  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ run()

ILIAS\GlobalScreen\Client\CallbackHandler::run ( )

Definition at line 63 of file CallbackHandler.php.

References ILIAS\GlobalScreen\Client\CallbackHandler\getIdentification(), and ILIAS\GlobalScreen\Client\CallbackHandler\resolveCallback().

63  : void
64  {
65  $this->ctrl->setTargetScript(self::TARGET_SCRIPT);
66 
67  $this->global_screen->collector()
68  ->tool()
69  ->collectOnce();
70 
71  $item = $this->global_screen->collector()
72  ->tool()
73  ->getSingleItem($this->getIdentification());
74 
75  if ($item instanceof isToolItem) {
76  $callback = $this->resolveCallback($item);
77  $callback();
78  }
79  }
+ Here is the call graph for this function:

Field Documentation

◆ $ctrl

ILIAS\GlobalScreen\Client\CallbackHandler::$ctrl
protected

Definition at line 47 of file CallbackHandler.php.

◆ $global_screen

ILIAS\GlobalScreen\Client\CallbackHandler::$global_screen
protected

Definition at line 51 of file CallbackHandler.php.

◆ $refinery

ILIAS\GlobalScreen\Client\CallbackHandler::$refinery
protected

Definition at line 43 of file CallbackHandler.php.

◆ $wrapper

ILIAS\GlobalScreen\Client\CallbackHandler::$wrapper
protected

Definition at line 39 of file CallbackHandler.php.

◆ KEY_ITEM

const ILIAS\GlobalScreen\Client\CallbackHandler::KEY_ITEM = 'item'

◆ TARGET_SCRIPT

const ILIAS\GlobalScreen\Client\CallbackHandler::TARGET_SCRIPT = "/ilias.php"
private

Definition at line 33 of file CallbackHandler.php.


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