ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
DownloadInteger.php
Go to the documentation of this file.
1<?php
2
20
28
36{
41 public function getOptions(array $input): array
42 {
43 return [
44 new UserInteractionOption("download", "download"),
45 ];
46 }
47
53 public function interaction(array $input, Option $user_selected_option, Bucket $bucket): 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 }
67
71 public function getInputTypes(): array
72 {
73 return [
74 new SingleType(IntegerValue::class),
75 ];
76 }
77
78 public function getOutputType(): Type
79 {
80 return new SingleType(IntegerValue::class);
81 }
82}
interaction(array $input, Option $user_selected_option, Bucket $bucket)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: AbstractJob.php:19
global $DIC
Definition: shib_login.php:26