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

WrapperFactory $wrapper
 
Factory $refinery
 
ilCtrlInterface $ctrl
 
Services $global_screen
 

Private Member Functions

 resolveCallback (isToolItem $item)
 
 getIdentification ()
 

Private Attributes

const TARGET_SCRIPT = "/ilias.php"
 

Detailed Description

Definition at line 30 of file CallbackHandler.php.

Constructor & Destructor Documentation

◆ __construct()

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

Definition at line 45 of file CallbackHandler.php.

46 {
47 global $DIC;
48 $this->ctrl = $DIC->ctrl();
49 $this->wrapper = $DIC->http()->wrapper();
50 $this->refinery = $DIC->refinery();
51 $this->global_screen = $DIC->globalScreen();
52 }
global $DIC
Definition: shib_login.php:26

References $DIC, ILIAS\Repository\ctrl(), and ILIAS\Repository\refinery().

+ Here is the call graph for this function:

Member Function Documentation

◆ getIdentification()

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

Definition at line 80 of file CallbackHandler.php.

80 : IdentificationInterface
81 {
82 $hashed = $this->wrapper->query()->has(self::KEY_ITEM)
83 ? $this->wrapper->query()->retrieve(self::KEY_ITEM, $this->refinery->to()->string())
84 : '';
85
86 $unhashed = $this->unhash($hashed);
87
88 return $this->global_screen->identification()->fromSerializedIdentification($unhashed);
89 }

References ILIAS\Repository\refinery().

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resolveCallback()

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

Definition at line 72 of file CallbackHandler.php.

72 : \Closure
73 {
74 return $item->hasCloseCallback()
75 ? $item->getCloseCallback()
76 : static function (): void {
77 };
78 }

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

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

+ 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 54 of file CallbackHandler.php.

54 : void
55 {
56 $this->ctrl->setTargetScript(self::TARGET_SCRIPT);
57
58 $this->global_screen->collector()
59 ->tool()
60 ->collectOnce();
61
62 $item = $this->global_screen->collector()
63 ->tool()
64 ->getSingleItem($this->getIdentification());
65
66 if ($item instanceof isToolItem) {
67 $callback = $this->resolveCallback($item);
68 $callback();
69 }
70 }

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

+ Here is the call graph for this function:

Field Documentation

◆ $ctrl

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

Definition at line 42 of file CallbackHandler.php.

◆ $global_screen

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

Definition at line 43 of file CallbackHandler.php.

◆ $refinery

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

Definition at line 41 of file CallbackHandler.php.

◆ $wrapper

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

Definition at line 40 of file CallbackHandler.php.

◆ KEY_ITEM

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

Definition at line 38 of file CallbackHandler.php.

◆ TARGET_SCRIPT

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

Definition at line 37 of file CallbackHandler.php.


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