ILIAS  trunk Revision v11.0_alpha-1831-g8615d53dadb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ILIAS\BackgroundTasks\Implementation\Tasks\DownloadInteger Class Reference
+ Inheritance diagram for ILIAS\BackgroundTasks\Implementation\Tasks\DownloadInteger:
+ Collaboration diagram for ILIAS\BackgroundTasks\Implementation\Tasks\DownloadInteger:

Public Member Functions

 getOptions (array $input)
 
 interaction (array $input, Option $user_selected_option, Bucket $bucket)
 
 getInputTypes ()
 
 getOutputType ()
 
- Public Member Functions inherited from ILIAS\BackgroundTasks\Implementation\Tasks\AbstractUserInteraction
 getMessage (array $input)
 
 canBeSkipped (array $input)
 
 getSkippedValue (array $input)
 
 isFinal ()
 
- Public Member Functions inherited from ILIAS\BackgroundTasks\Implementation\Tasks\AbstractTask
 setInput (array $values)
 
 getOutput ()
 
 getInput ()
 
 getType ()
 
 unfoldTask ()
 Unfold the task. More...
 
 getRemoveOption ()
 
Returns
Option An Option to remove the current task and do some cleanup if possible. This Option is displayed if the Bucket is completed. You do not have to provide an additional Option to remove in your UserInteraction, the remove-Option is added to the list of Options (last position)
See also
self::getAbortOption();
More...
 
 getAbortOption ()
 
Returns
Option In case a Job is failed or did not respond for some time, an Abort-Option is displayed. There is already a Standard-Abort-Option registered, you can override with your own and do some cleanup if possible.
More...
 

Additional Inherited Members

- Data Fields inherited from ILIAS\BackgroundTasks\Implementation\Tasks\AbstractTask
const MAIN_REMOVE = 'bt_main_remove'
 
const MAIN_ABORT = 'bt_main_abort'
 
- Protected Member Functions inherited from ILIAS\BackgroundTasks\Implementation\Tasks\AbstractTask
 checkTypes (array $values)
 
 extractType ($value)
 
- Protected Attributes inherited from ILIAS\BackgroundTasks\Implementation\Tasks\AbstractTask
array $input = []
 
Value $output
 

Detailed Description

Definition at line 35 of file DownloadInteger.php.

Member Function Documentation

◆ getInputTypes()

ILIAS\BackgroundTasks\Implementation\Tasks\DownloadInteger::getInputTypes ( )
Returns
Type[] Class-Name of the IO

Implements ILIAS\BackgroundTasks\Task.

Definition at line 71 of file DownloadInteger.php.

71  : array
72  {
73  return [
74  new SingleType(IntegerValue::class),
75  ];
76  }

◆ getOptions()

ILIAS\BackgroundTasks\Implementation\Tasks\DownloadInteger::getOptions ( array  $input)
Parameters
Value[]$input The input value of this task.
Returns
Option[] Options are buttons the user can press on this interaction.

Implements ILIAS\BackgroundTasks\Task\UserInteraction.

Definition at line 41 of file DownloadInteger.php.

41  : array
42  {
43  return [
44  new UserInteractionOption("download", "download"),
45  ];
46  }

◆ getOutputType()

ILIAS\BackgroundTasks\Implementation\Tasks\DownloadInteger::getOutputType ( )

Implements ILIAS\BackgroundTasks\Task.

Definition at line 78 of file DownloadInteger.php.

78  : Type
79  {
80  return new SingleType(IntegerValue::class);
81  }

◆ interaction()

ILIAS\BackgroundTasks\Implementation\Tasks\DownloadInteger::interaction ( array  $input,
Option  $user_selected_option,
Bucket  $bucket 
)
Parameters
array$inputThe input value of this task.
Option$user_selected_optionThe Option the user chose.
Bucket$bucketNotify the bucket about your progress!

Implements ILIAS\BackgroundTasks\Task\UserInteraction.

Definition at line 53 of file DownloadInteger.php.

References $DIC, and ILIAS\BackgroundTasks\Task\UserInteraction\Option\getValue().

53  : Value
54  {
55  $integerValue = $input[0];
56  global $DIC;
57 
58  if ($user_selected_option->getValue() === "download") {
59  $outputter = new \ilPHPOutputDelivery();
60  $outputter->start("IntegerFile");
61  echo $integerValue->getValue();
62  $outputter->stop();
63  }
64 
65  return $integerValue;
66  }
global $DIC
Definition: shib_login.php:22
+ Here is the call graph for this function:

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