ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
DownloadInteger.php
Go to the documentation of this file.
1 <?php
2 
4 
12 
13 require_once("./Services/FileDelivery/classes/class.ilPHPOutputDelivery.php");
14 
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 }
interaction(array $input, Option $user_selected_option, Bucket $bucket)
global $DIC
Definition: saml.php:7