29use ILIAS\components\OrgUnit\ARHelper\DIC;
52 $cmd = $this->
ctrl()->getCmd();
74 self::CMD_USER_INTERACTION,
87 if ($observer_id ===
null || $selected_option ===
null) {
91 $bucket = $this->dic()->backgroundTasks()->persistence()->loadBucket($observer_id);
95 $this->dic()->backgroundTasks()->taskManager()->continueTask(
107 if ($observer_id ===
null) {
111 $bucket = $this->dic()->backgroundTasks()->persistence()->loadBucket($observer_id);
115 $this->dic()->backgroundTasks()->taskManager()->quitBucket($bucket);
128 if ($observer_id ===
null) {
132 $bucket = $this->dic()->backgroundTasks()->persistence()->loadBucket($observer_id);
137 $this->dic()->language()->loadLanguageModule(
'background_tasks');
138 $item = $item_source->getItemForObserver($bucket);
142 $this->dic()->
ui()->
renderer()->renderAsync($item)
153 if ($decoded_from_url ===
null || $decoded_from_url ===
'') {
158 if ($from_url ===
false) {
162 $from_url_parts = parse_url($from_url);
163 if (!is_array($from_url_parts)) {
167 $uri = $uri->withPath(
null)->withQuery(
null)->withFragment(
null);
175 foreach ($mutators as $key => $apply) {
176 $value = $from_url_parts[$key] ??
null;
177 if (is_string($value) && $value !==
'') {
178 $uri = $apply($uri, $value);
185 public static function hash(
string $url): string
187 return base64_encode((
string) $url);
190 public static function unhash(
string $url): string|false
192 return base64_decode((
string) $url);
197 if ($bucket->
getUserId() !== $this->user()->getId()) {
215 $this->
http()->sendResponse();
216 $this->
http()->close();
226 $this->
http()->close();
233 $this->tpl()->setOnScreenMessage(
234 $this->tpl()::MESSAGE_TYPE_FAILURE,
235 $this->
lng()->txt(
'permission_denied'),
244 $this->
http()->sendResponse();
245 $this->
http()->close();
250 return $this->
http()->wrapper()->query()->retrieve(
251 self::SELECTED_OPTION,
252 $this->dic()->
refinery()->byTrying([
253 $this->dic()->
refinery()->kindlyTo()->
string(),
254 $this->dic()->
refinery()->always(
null)
261 return $this->
http()->wrapper()->query()->retrieve(
263 $this->dic()->
refinery()->byTrying([
264 $this->dic()->
refinery()->kindlyTo()->
bool(),
265 $this->dic()->
refinery()->always(
false)
272 return $this->
http()->wrapper()->query()->retrieve(
274 $this->dic()->
refinery()->byTrying([
275 $this->dic()->
refinery()->kindlyTo()->
int(),
276 $this->dic()->
refinery()->always(
null)
283 return $this->
http()->wrapper()->query()->retrieve(
285 $this->dic()->
refinery()->byTrying([
286 $this->dic()->
refinery()->kindlyTo()->
string(),
287 $this->dic()->
refinery()->always(
null)
const CMD_USER_INTERACTION
const CMD_GET_REPLACEMENT_ITEM
retrieveFromUrlFromRequest()
retrieveObserverIdFromRequest()
getUnsafeGetCommands()
This method must return a list of unsafe GET commands.
enforceBucketBelongsToCurrentUser(Bucket $bucket)
respondWithError(int $error_status_code, string $message)
sendSuccessResponse(Stream $stream)
wasInvokedAsynchronously()
getAsyncReplacementItem()
Loads one single aggregate notification item representing a button async to replace an existing one.
retrieveSelectedInteractionOption()
redirectToCallerOrClose()
static unhash(string $url)
getSafePostCommands()
This method must return a list of safe POST commands.
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.
static ofString(string $string)
Creates a new stream with an initial value.
Util class various functions, usage as namespace.
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...
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.