ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
DownloadInteger.php
Go to the documentation of this file.
1
<?
php
2
3
namespace
ILIAS\BackgroundTasks\Implementation\Tasks
;
4
5
use
ILIAS\BackgroundTasks\Bucket
;
6
use
ILIAS\BackgroundTasks\Implementation\Tasks\UserInteraction\UserInteractionOption
;
7
use
ILIAS\BackgroundTasks\Implementation\Values\ScalarValues\IntegerValue
;
8
use
ILIAS\BackgroundTasks\Task\UserInteraction\Option
;
9
use
ILIAS\BackgroundTasks\Types\SingleType
;
10
use
ILIAS\BackgroundTasks\Types\Type
;
11
use
ILIAS\BackgroundTasks\Value
;
12
13
require_once(
"./Services/FileDelivery/classes/class.ilPHPOutputDelivery.php"
);
14
24
class
DownloadInteger
extends
AbstractUserInteraction
25
{
26
32
public
function
getOptions
(array
$input
)
33
{
34
return
[
35
new
UserInteractionOption
(
"download"
,
"download"
),
36
];
37
}
38
39
47
public
function
interaction
(array
$input
,
Option
$user_selected_option,
Bucket
$bucket)
48
{
50
$integerValue = $input[0];
51
global
$DIC
;
52
53
if
($user_selected_option->
getValue
() ==
"download"
) {
54
$outputter = new \ilPHPOutputDelivery();
55
$outputter->start(
"IntegerFile"
);
56
echo
$integerValue->getValue();
57
$outputter->stop();
58
}
59
60
return
$integerValue;
61
}
62
63
67
public
function
getInputTypes
()
68
{
69
return
[
70
new
SingleType
(IntegerValue::class),
71
];
72
}
73
74
78
public
function
getOutputType
()
79
{
80
return
new
SingleType
(IntegerValue::class);
81
}
82
}
ILIAS\BackgroundTasks\Task\UserInteraction\interaction
interaction(array $input, Option $user_selected_option, Bucket $bucket)
SingleType
ILIAS\BackgroundTasks\Implementation\Tasks\AbstractUserInteraction
Definition:
AbstractUserInteraction.php:15
ILIAS\BackgroundTasks\Implementation\Tasks\DownloadInteger\getOptions
getOptions(array $input)
Definition:
DownloadInteger.php:32
ILIAS\BackgroundTasks\Implementation\Tasks
Definition:
AbstractJob.php:3
$DIC
global $DIC
Definition:
saml.php:7
ILIAS\BackgroundTasks\Task\UserInteraction\Option
Definition:
Option.php:13
ILIAS\BackgroundTasks\Implementation\Tasks\DownloadInteger
Definition:
DownloadInteger.php:24
ILIAS\BackgroundTasks\Bucket
Definition:
Bucket.php:15
IntegerValue
ILIAS\BackgroundTasks\Types\SingleType
Definition:
SingleType.php:5
Bucket
ILIAS\BackgroundTasks\Implementation\Tasks\AbstractTask\$input
$input
Definition:
AbstractTask.php:28
echo
ILIAS\BackgroundTasks\Implementation\Tasks\DownloadInteger\getInputTypes
getInputTypes()
Definition:
DownloadInteger.php:67
php
UserInteractionOption
ILIAS\BackgroundTasks\Implementation\Tasks\UserInteraction\UserInteractionOption
Definition:
UserInteractionOption.php:7
Type
Value
ILIAS\BackgroundTasks\Implementation\Tasks\DownloadInteger\getOutputType
getOutputType()
Definition:
DownloadInteger.php:78
Option
ILIAS\BackgroundTasks\Task\UserInteraction\Option\getValue
getValue()
src
BackgroundTasks
Implementation
Tasks
DownloadInteger.php
Generated on Thu Jan 16 2025 19:02:36 for ILIAS by
1.8.13 (using
Doxyfile
)