27use ILIAS\components\OrgUnit\ARHelper\DIC;
49 $cmd = $this->
ctrl()->getCmd();
71 self::CMD_USER_INTERACTION,
84 if ($observer_id ===
null || $selected_option ===
null) {
88 $bucket = $this->dic()->backgroundTasks()->persistence()->loadBucket($observer_id);
92 $this->dic()->backgroundTasks()->taskManager()->continueTask(
104 if ($observer_id ===
null) {
108 $bucket = $this->dic()->backgroundTasks()->persistence()->loadBucket($observer_id);
112 $this->dic()->backgroundTasks()->taskManager()->quitBucket($bucket);
125 if ($observer_id ===
null) {
129 $bucket = $this->dic()->backgroundTasks()->persistence()->loadBucket($observer_id);
134 $this->dic()->language()->loadLanguageModule(
'background_tasks');
135 $item = $item_source->getItemForObserver($bucket);
139 $this->dic()->
ui()->
renderer()->renderAsync($item)
150 if ($decoded_from_url ===
null || $decoded_from_url ===
'') {
155 if ($from_url ===
false) {
159 $from_url_parts = parse_url($from_url);
160 if (!is_array($from_url_parts)) {
164 $uri = $uri->withPath(
null)->withQuery(
null)->withFragment(
null);
172 foreach ($mutators as $key => $apply) {
173 $value = $from_url_parts[$key] ??
null;
174 if (is_string($value) && $value !==
'') {
175 $uri = $apply($uri, $value);
184 return base64_encode((
string)
$url);
189 return base64_decode((
string)
$url);
194 if ($bucket->
getUserId() !== $this->user()->getId()) {
207 ->withStatus(StatusCode::HTTP_OK,
'OK')
212 $this->
http()->sendResponse();
213 $this->
http()->close();
223 $this->
http()->close();
228 $response = $this->
http()->response()->withStatus($error_status_code, $message);
230 $this->tpl()->setOnScreenMessage(
231 $this->tpl()::MESSAGE_TYPE_FAILURE,
232 $this->
lng()->txt(
'permission_denied'),
236 ->withStatus(StatusCode::HTTP_FOUND,
'Found')
241 $this->
http()->sendResponse();
242 $this->
http()->close();
247 return $this->
http()->wrapper()->query()->retrieve(
248 self::SELECTED_OPTION,
249 $this->dic()->
refinery()->byTrying([
250 $this->dic()->
refinery()->kindlyTo()->
string(),
251 $this->dic()->
refinery()->always(
null)
258 return $this->
http()->wrapper()->query()->retrieve(
260 $this->dic()->
refinery()->byTrying([
261 $this->dic()->
refinery()->kindlyTo()->
bool(),
262 $this->dic()->
refinery()->always(
false)
269 return $this->
http()->wrapper()->query()->retrieve(
271 $this->dic()->
refinery()->byTrying([
272 $this->dic()->
refinery()->kindlyTo()->
int(),
273 $this->dic()->
refinery()->always(
null)
280 return $this->
http()->wrapper()->query()->retrieve(
282 $this->dic()->
refinery()->byTrying([
283 $this->dic()->
refinery()->kindlyTo()->
string(),
284 $this->dic()->
refinery()->always(
null)
The scope of this class is split ilias-conform URI's into components.
withFragment(?string $fragment=null)
Get URI with modified fragment.
withPath(?string $path=null)
Get URI with modified path.
withQuery(?string $query=null)
Get URI with modified query.
Stream factory which enables the user to create streams without the knowledge of the concrete class.
retrieveObserverIdFromRequest()
retrieveSelectedInteractionOption()
redirectToCallerOrClose()
getUnsafeGetCommands()
This method must return a list of unsafe GET commands.
respondWithError(int $error_status_code, string $message)
retrieveFromUrlFromRequest()
const CMD_USER_INTERACTION
enforceBucketBelongsToCurrentUser(Bucket $bucket)
wasInvokedAsynchronously()
sendSuccessResponse(Stream $stream)
static unhash(string $url)
const CMD_GET_REPLACEMENT_ITEM
getSafePostCommands()
This method must return a list of safe POST commands.
getAsyncReplacementItem()
Loads one single aggregate notification item representing a button async to replace an existing one.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static http()
Fetches the global http state from ILIAS.