ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.StandardGUIRequest.php
Go to the documentation of this file.
1<?php
2
19namespace ILIAS\MediaCast;
20
22
24{
25 use BaseGUIRequest;
26
27 public function __construct(
28 \ILIAS\HTTP\Services $http,
30 ?array $passed_query_params = null,
31 ?array $passed_post_data = null
32 ) {
33 $this->initRequest(
34 $http,
36 $passed_query_params,
37 $passed_post_data
38 );
39 }
40
41 public function getRefId(): int
42 {
43 return $this->int("ref_id");
44 }
45
46 public function getUserId(): int
47 {
48 return $this->int("user_id");
49 }
50
51 public function getItemId(): int
52 {
53 $item_ids = $this->intArray("mcst_ids");
54 if (count($item_ids) === 1) {
55 return (int) current($item_ids);
56 }
57 $item_id = $this->int("mcst_ids");
58 if ($item_id > 0) {
59 return $item_id;
60 }
61 return $this->int("item_id");
62 }
63
64 public function getPurpose(): string
65 {
66 return $this->str("purpose");
67 }
68
69 public function getPresentation(): bool
70 {
71 return (bool) $this->int("presentation");
72 }
73
74 public function getEvent(): string
75 {
76 return $this->str("event");
77 }
78
79 public function getPlayer(): string
80 {
81 return $this->str("player");
82 }
83
84 public function getMobId(): int
85 {
86 return $this->int("mob_id");
87 }
88
89 public function getAutoplay(): bool
90 {
91 return (bool) $this->int("autoplay");
92 }
93
95 public function getItemIds(): array
96 {
97 $ids = $this->intArray("mcst_ids");
98 if (count($ids) > 0) {
99 return $ids; // from table multi action
100 }
101 $ids = $this->intArray("interruptive_items"); // from confirmation
102 if (count($ids) > 0) {
103 return $ids;
104 }
105 return $this->intArray("item_id");
106 }
107
108 public function getTargetPurpose(): string
109 {
110 return $this->str("target_purpose");
111 }
112
113 public function getTargetFormat(): string
114 {
115 return $this->str("target_format");
116 }
117
118 public function getSeconds(): int
119 {
120 return $this->int("sec");
121 }
122
123 public function getSettingsPurpose(string $purpose): string
124 {
125 return $this->str($purpose);
126 }
127
128 public function getDefaultAccess(): string
129 {
130 return $this->str("defaultaccess");
131 }
132
133 public function getMimeTypes(): string
134 {
135 return $this->str("mimetypes");
136 }
137
138 public function getTableAction(string $action_parameter): string
139 {
140 return $this->str($action_parameter);
141 }
142}
Builds a Color from either hex- or rgb values.
Definition: Factory.php:31
__construct(\ILIAS\HTTP\Services $http, \ILIAS\Refinery\Factory $refinery, ?array $passed_query_params=null, ?array $passed_post_data=null)
trait BaseGUIRequest
Base gui request wrapper.
$http
Definition: deliver.php:30
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
initRequest(HTTP\Services $http, Refinery\Factory $refinery, ?array $passed_query_params=null, ?array $passed_post_data=null)
Query params and post data parameters are used for testing.
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.