19 declare(strict_types=1);
41 array $gui_params = [],
42 array $mail_params = [],
43 array $context_params = []
45 return self::getTargetUrl(
'&', $gui, $cmd, $gui_params, $mail_params, $context_params);
54 array $gui_params = [],
55 array $mail_params = [],
56 array $context_params = []
58 return self::getTargetUrl(
'&', $gui, $cmd, $gui_params, $mail_params, $context_params);
65 string $argument_separator,
68 array $gui_params = [],
69 array $mail_params = [],
70 array $context_params = []
77 foreach ($mail_params as $key => $value) {
78 $mparams .= $argument_separator . $key .
'=' . urlencode((
string) $value);
81 foreach ($context_params as $key => $value) {
82 if ($key === self::CONTEXT_KEY) {
83 $mparams .= $argument_separator . $key .
'=' . urlencode((
string) $value);
85 $mparams .= $argument_separator . self::CONTEXT_PREFIX .
'_' . $key .
'=' . urlencode((
string) $value);
89 if (is_object($gui)) {
90 $ilCtrlTmp = clone $DIC->ctrl();
91 foreach ($gui_params as $key => $value) {
92 $ilCtrlTmp->setParameter($gui, $key, $value);
94 $referer = $ilCtrlTmp->getLinkTarget($gui, $cmd,
'');
95 } elseif (is_string($gui)) {
99 $referer = $argument_separator . self::REFERER_KEY .
'=' . rawurlencode(base64_encode($referer));
101 return 'ilias.php?baseClass=ilMailGUI' . $referer . $mparams;
111 if (isset($queryParameters[self::REFERER_KEY])) {
112 $session[self::REFERER_KEY] = base64_decode(rawurldecode($queryParameters[self::REFERER_KEY]));
113 $session[self::SIGNATURE_KEY] = base64_decode(
115 $queryParameters[self::SIGNATURE_KEY] ??
'' 119 $contextParameters = [];
120 foreach ($queryParameters as $key => $value) {
121 $prefix = substr($key, 0, strlen(self::CONTEXT_PREFIX));
122 if ($prefix === self::CONTEXT_PREFIX) {
123 if ($key === self::CONTEXT_KEY) {
124 $contextParameters[$key] = $value;
126 $contextParameters[substr($key, strlen(self::CONTEXT_PREFIX .
'_'))] = $value;
130 $session[self::CONTEXT_PREFIX] = $contextParameters;
132 if (isset($session[self::REFERER_KEY])) {
133 unset($session[self::REFERER_KEY]);
135 if (isset($session[self::SIGNATURE_KEY])) {
136 unset($session[self::SIGNATURE_KEY]);
138 if (isset($session[self::CONTEXT_PREFIX])) {
139 unset($session[self::CONTEXT_PREFIX]);
151 if (isset($session[self::SIGNATURE_KEY])) {
152 $sig = $session[self::SIGNATURE_KEY];
154 unset($session[self::SIGNATURE_KEY]);
166 if (isset($session[self::REFERER_KEY])) {
167 $url = $session[self::REFERER_KEY];
168 if (is_string(
$url) &&
$url !==
'') {
171 $url .=
'&returned_from_mail=1';
173 $url .=
'?returned_from_mail=1';
177 if (isset(
$parts[
'host']) && $ilias_url_parts[
'host'] !==
$parts[
'host']) {
178 $url =
'ilias.php?baseClass=ilMailGUI';
182 unset($session[self::REFERER_KEY]);
194 isset($session[self::REFERER_KEY]) &&
195 is_string($session[self::REFERER_KEY]) &&
196 $session[self::REFERER_KEY] !==
'' 204 isset($session[self::CONTEXT_PREFIX][self::CONTEXT_KEY]) &&
205 is_string($session[self::CONTEXT_PREFIX][self::CONTEXT_KEY]) ?
206 $session[self::CONTEXT_PREFIX][self::CONTEXT_KEY] :
null 213 $session[self::CONTEXT_KEY] =
$id;
220 if (isset($session[self::CONTEXT_PREFIX]) && is_array($session[self::CONTEXT_PREFIX])) {
221 return $session[self::CONTEXT_PREFIX];
230 $session[self::CONTEXT_PREFIX] = $parameters;
237 public static function setRecipients(array $recipients,
string $type =
'to'): void
240 $session[
'rcp_' . $type] =
array_map(
'strval', array_values($recipients));
250 $key =
'rcp_' . $type;
251 if (isset($session[$key]) && is_array($session[$key])) {
252 return array_map(
'strval', array_values($session[$key]));
static get(string $a_var)
if($clientAssertionType !='urn:ietf:params:oauth:client-assertion-type:jwt-bearer'|| $grantType !='client_credentials') $parts
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
static set(string $a_var, $a_val)
Set a value.