6    $renderer = 
$DIC->ui()->renderer();
 
    8    $async_close = 
$_SERVER[
'REQUEST_URI'] . 
'&close_item=true';
 
    9    $async_replace_url = 
$_SERVER[
'REQUEST_URI'] . 
'&async_load_replace=true';
 
   10    $async_replace_content_load_url = 
$_SERVER[
'REQUEST_URI'] . 
'&async_load_replace_content=true';
 
   13    $icon = 
$f->symbol()->icon()->standard(
"chtr", 
"chtr");
 
   14    $title = 
$f->link()->standard(
"Some Title", 
"#");
 
   15    $item = 
$f->item()->notification($title, $icon)->withCloseAction($async_close);
 
   17    $async_item = $item->withAggregateNotifications([$item->withDescription(
"Original Item")]);
 
   19    if (
$_GET[
'async_load_replace']) {
 
   20        $replacement = $async_item
 
   21            ->withDescription(
"The Item has been replaced Async.")
 
   22            ->withAggregateNotifications([$item->withDescription(
"This is a freshly async delivered Item.")
 
   23                                          ,$item->withDescription(
"And a second one")]);
 
   24        echo $renderer->renderAsync([$replacement]);
 
   28    if (
$_GET[
'async_load_replace_content']) {
 
   29        $replacement = $async_item
 
   30            ->withDescription(
"The content of the Item has been replaced Async.")
 
   31            ->withAggregateNotifications([$item->withDescription(
"You will never see this")]);
 
   32        echo $renderer->renderAsync($replacement);
 
   36    $async_replace = $async_item
 
   37        ->withDescription(
"The complete Item will be replaced Async")
 
   38        ->withAdditionalOnLoadCode(
function ($id) use ($async_replace_url) {
 
   40                    var item = il.UI.item.notification.getNotificationItemObject($($id)); 
   41                    item.replaceByAsyncItem('$async_replace_url',{}); 
   45    $async_replace_content = $async_item
 
   46        ->withDescription(
"The content of the Item will be replaced Async")
 
   47        ->withAdditionalOnLoadCode(
function ($id) use ($async_replace_content_load_url) {
 
   49                    var item = il.UI.item.notification.getNotificationItemObject($($id)); 
   50                    item.replaceContentByAsyncItemContent('$async_replace_content_load_url',{}); 
   54    return $renderer->render([$async_replace,$async_replace_content]);
 
An exception for terminatinating execution or to throw for unit testing.