ILIAS
release_8 Revision v8.19
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
$
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
x
+
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
+
Variables
$
a
b
c
d
e
f
g
h
j
l
m
p
s
t
u
+
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
+
Data Fields
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Ö
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Ö
+
Files
File List
+
Globals
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
+
Functions
_
a
b
c
d
e
g
h
i
m
n
p
r
s
t
u
v
x
+
Variables
$
a
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
z
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Modules
Pages
closable.php
Go to the documentation of this file.
1
<?php
2
3
declare(strict_types=1);
4
5
namespace
ILIAS\UI\examples\Item\Notification
;
6
7
function
closable
()
8
{
9
global
$DIC
;
10
$refinery
= $DIC->refinery();
11
$request_wrapper
= $DIC->http()->wrapper()->query();
12
13
$close_url =
$_SERVER
[
'REQUEST_URI'
] .
'&mail_closed=true'
;
14
15
//If closed, an ajax request is fired to the set close_url
16
if
(
$request_wrapper
->has(
'mail_closed'
) &&
$request_wrapper
->retrieve(
'mail_closed'
,
$refinery
->kindlyTo()->bool())) {
17
//Do Some Magic needed to be done, when this item is closed.
18
exit
;
19
}
20
21
//Creating a closable Mail Notification Item
22
$f
= $DIC->ui()->factory();
23
$renderer = $DIC->ui()->renderer();
24
25
$mail_icon =
$f
->symbol()->icon()->standard(
"mail"
,
"mail"
);
26
$mail_title =
$f
->link()->standard(
"Inbox"
,
"#"
);
27
$mail_notification_item =
$f
->item()->notification($mail_title, $mail_icon)
28
->withDescription(
"You have 23 unread mails in your inbox"
)
29
->withProperties([
"Time"
=>
"3 days ago"
])
30
->withCloseAction($close_url);
31
32
33
return
$renderer->render($mail_notification_item);
34
}
exit
exit
Definition:
login.php:28
ILIAS\UI\examples\Item\Notification\closable
closable()
Definition:
closable.php:7
$DIC
global $DIC
Definition:
feed.php:28
ILIAS\UI\examples\Tree\Expandable\$request_wrapper
$request_wrapper
Definition:
expandable_async_repo.php:9
Vendor\Package\$f
$f
Definition:
example_cleaned.php:49
$_SERVER
$_SERVER['HTTP_HOST']
Definition:
raiseError.php:10
ILIAS\UI\examples\Item\Notification
Definition:
base.php:5
ILIAS\Repository\$refinery
Refinery Factory $refinery
Definition:
trait.BaseGUIRequest.php:36
src
UI
examples
Item
Notification
closable.php
Generated on Tue Apr 1 2025 22:02:49 for ILIAS by
1.8.13 (using
Doxyfile
)