ILIAS
release_6 Revision v6.24-5-g0c8bfefb3b8
◀ 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
p
s
t
w
+
Functions
_
a
b
c
f
g
h
i
s
t
w
+
Variables
$
c
d
e
f
g
h
j
l
m
p
s
t
+
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
q
r
s
t
u
v
w
x
z
+
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
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Modules
Pages
closable.php
Go to the documentation of this file.
1
<?php
2
function
closable
()
3
{
4
$close_url =
$_SERVER
[
'REQUEST_URI'
] .
'&mail_closed=true'
;
5
6
//If closed, an ajax request is fired to the set close_url
7
if
(
$_GET
[
'mail_closed'
]) {
8
//Do Some Magic needed to be done, when this item is closed.
9
exit
;
10
}
11
12
//Creating a closable Mail Notification Item
13
global
$DIC
;
14
$f
= $DIC->ui()->factory();
15
$renderer = $DIC->ui()->renderer();
16
17
$mail_icon =
$f
->symbol()->icon()->standard(
"mail"
,
"mail"
);
18
$mail_title =
$f
->link()->standard(
"Inbox"
,
"link_to_inbox"
);
19
$mail_notification_item =
$f
->item()->notification($mail_title, $mail_icon)
20
->withDescription(
"You have 23 unread mails in your inbox"
)
21
->withProperties([
"Time"
=>
"3 days ago"
])
22
->withCloseAction($close_url);
23
24
25
return
$renderer->render($mail_notification_item);
26
}
exit
exit
Definition:
login.php:29
$_GET
$_GET["client_id"]
Definition:
cfg.phpunit.template.php:12
Vendor\Package\$f
$f
Definition:
example_cleaned.php:31
$_SERVER
$_SERVER['HTTP_HOST']
Definition:
raiseError.php:10
$DIC
$DIC
Definition:
xapitoken.php:46
closable
closable()
Definition:
closable.php:2
src
UI
examples
Item
Notification
closable.php
Generated on Sun Apr 6 2025 20:01:40 for ILIAS by
1.8.13 (using
Doxyfile
)