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.

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

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.
+ Here is the call graph for this function:

◆ executeCommand()

ilBTControllerGUI::executeCommand ( )

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

References performCommand().

26  {
27  switch ($this->ctrl()->getCmdClass()) {
28  default:
29  $this->performCommand();
30  }
31  }
+ Here is the call graph for this function:

◆ getFromURL()

ilBTControllerGUI::getFromURL ( )
protected
Returns
string

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

References ILIAS\FileDelivery\http().

Referenced by abortBucket(), and userInteraction().

94  {
95  $from_url = self::unhash($this->http()->request()->getQueryParams()[self::FROM_URL]);
96 
97  return $from_url;
98  }
static http()
Fetches the global http state from ILIAS.
+ 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.

References $url.

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

107  {
108  return base64_encode($url);
109  }
$url
+ Here is the caller graph for this function:

◆ performCommand()

ilBTControllerGUI::performCommand ( )
protected

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

Referenced by executeCommand().

35  {
36  $cmd = $this->ctrl()->getCmd();
37  switch ($cmd) {
38  case self::CMD_USER_INTERACTION:
39  case self::CMD_GET_POPOVER_CONTENT:
40  case self::CMD_ABORT:
41  case self::CMD_REMOVE:
42  $this->$cmd();
43  }
44  }
+ 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.

References $url.

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

◆ userInteraction()

ilBTControllerGUI::userInteraction ( )
protected

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

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

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  }
static http()
Fetches the global http state from ILIAS.
+ 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().

◆ CMD_GET_POPOVER_CONTENT

const ilBTControllerGUI::CMD_GET_POPOVER_CONTENT = 'getPopoverContent'

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

Referenced by ilMainMenuGUI\renderBackgroundTasks().

◆ CMD_REMOVE

const ilBTControllerGUI::CMD_REMOVE = 'abortBucket'

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

Referenced by ilBTPopOverGUI\addButton().

◆ CMD_USER_INTERACTION

const ilBTControllerGUI::CMD_USER_INTERACTION = 'userInteraction'

◆ 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'

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