ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilBTControllerGUI Class Reference

Class ilBTControllerGUI. More...

+ Collaboration diagram for ilBTControllerGUI:

Public Member Functions

 executeCommand ()
 

Static Public Member Functions

static hash ($url)
 
static unhash ($url)
 

Data Fields

const FROM_URL = 'from_url'
 
const OBSERVER_ID = 'observer_id'
 
const SELECTED_OPTION = 'selected_option'
 
const REPLACE_SIGNAL = 'replaceSignal'
 
const CMD_ABORT = 'abortBucket'
 
const CMD_REMOVE = 'abortBucket'
 
const CMD_GET_POPOVER_CONTENT = 'getPopoverContent'
 
const CMD_USER_INTERACTION = 'userInteraction'
 

Protected Member Functions

 performCommand ()
 
 userInteraction ()
 
 abortBucket ()
 
 getFromURL ()
 

Detailed Description

Member Function Documentation

◆ abortBucket()

ilBTControllerGUI::abortBucket ( )
protected

Definition at line 60 of file class.ilBTControllerGUI.php.

61 {
62 $observer_id = (int) $this->http()->request()->getQueryParams()[self::OBSERVER_ID];
63 $from_url = $this->getFromURL();
64
65 $bucket = $this->dic()->backgroundTasks()->persistence()->loadBucket($observer_id);
66
67 $this->dic()->backgroundTasks()->taskManager()->quitBucket($bucket);
68
69 $this->ctrl()->redirectToURL($from_url);
70 }
static http()
Fetches the global http state from ILIAS.

References getFromURL(), ILIAS\FileDelivery\http(), and OBSERVER_ID.

+ Here is the call graph for this function:

◆ executeCommand()

ilBTControllerGUI::executeCommand ( )

Definition at line 25 of file class.ilBTControllerGUI.php.

26 {
27 switch ($this->ctrl()->getCmdClass()) {
28 default:
29 $this->performCommand();
30 }
31 }

References performCommand().

+ Here is the call graph for this function:

◆ getFromURL()

ilBTControllerGUI::getFromURL ( )
protected
Returns
string

Definition at line 93 of file class.ilBTControllerGUI.php.

94 {
95 $from_url = self::unhash($this->http()->request()->getQueryParams()[self::FROM_URL]);
96
97 return $from_url;
98 }

References ILIAS\FileDelivery\http(), and unhash().

Referenced by abortBucket(), and userInteraction().

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

◆ hash()

static ilBTControllerGUI::hash (   $url)
static
Parameters
$url
Returns
string

Definition at line 106 of file class.ilBTControllerGUI.php.

107 {
108 return base64_encode($url);
109 }
$url

References $url.

Referenced by ilBTPopOverGUI\addFromUrlToNextRequest(), and ilMainMenuGUI\renderBackgroundTasks().

+ Here is the caller graph for this function:

◆ performCommand()

ilBTControllerGUI::performCommand ( )
protected

Definition at line 34 of file class.ilBTControllerGUI.php.

35 {
36 $cmd = $this->ctrl()->getCmd();
37 switch ($cmd) {
40 case self::CMD_ABORT:
42 $this->$cmd();
43 }
44 }

References CMD_ABORT, CMD_GET_POPOVER_CONTENT, CMD_REMOVE, and CMD_USER_INTERACTION.

Referenced by executeCommand().

+ Here is the caller graph for this function:

◆ unhash()

static ilBTControllerGUI::unhash (   $url)
static
Parameters
$url
Returns
string

Definition at line 117 of file class.ilBTControllerGUI.php.

118 {
119 return base64_decode($url);
120 }

References $url.

Referenced by getFromURL().

+ Here is the caller graph for this function:

◆ userInteraction()

ilBTControllerGUI::userInteraction ( )
protected

Definition at line 47 of file class.ilBTControllerGUI.php.

48 {
49 $observer_id = (int) $this->http()->request()->getQueryParams()[self::OBSERVER_ID];
50 $selected_option = $this->http()->request()->getQueryParams()[self::SELECTED_OPTION];
51 $from_url = $this->getFromURL();
52
53 $observer = $this->dic()->backgroundTasks()->persistence()->loadBucket($observer_id);
54 $option = new UserInteractionOption("", $selected_option);
55 $this->dic()->backgroundTasks()->taskManager()->continueTask($observer, $option);
56 $this->ctrl()->redirectToURL($from_url);
57 }

References getFromURL(), ILIAS\FileDelivery\http(), OBSERVER_ID, and SELECTED_OPTION.

+ Here is the call graph for this function:

Field Documentation

◆ CMD_ABORT

const ilBTControllerGUI::CMD_ABORT = 'abortBucket'

Definition at line 19 of file class.ilBTControllerGUI.php.

Referenced by ilBTPopOverGUI\addButton(), and performCommand().

◆ CMD_GET_POPOVER_CONTENT

const ilBTControllerGUI::CMD_GET_POPOVER_CONTENT = 'getPopoverContent'

◆ CMD_REMOVE

const ilBTControllerGUI::CMD_REMOVE = 'abortBucket'

Definition at line 20 of file class.ilBTControllerGUI.php.

Referenced by ilBTPopOverGUI\addButton(), and performCommand().

◆ CMD_USER_INTERACTION

const ilBTControllerGUI::CMD_USER_INTERACTION = 'userInteraction'

Definition at line 22 of file class.ilBTControllerGUI.php.

Referenced by ilBTPopOverGUI\addButton(), and performCommand().

◆ FROM_URL

const ilBTControllerGUI::FROM_URL = 'from_url'

◆ OBSERVER_ID

const ilBTControllerGUI::OBSERVER_ID = 'observer_id'

◆ REPLACE_SIGNAL

const ilBTControllerGUI::REPLACE_SIGNAL = 'replaceSignal'

Definition at line 18 of file class.ilBTControllerGUI.php.

Referenced by ilMainMenuGUI\renderBackgroundTasks().

◆ SELECTED_OPTION

const ilBTControllerGUI::SELECTED_OPTION = 'selected_option'

Definition at line 17 of file class.ilBTControllerGUI.php.

Referenced by ilBTPopOverGUI\addButton(), and userInteraction().


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