19 declare(strict_types=1);
    21 require_once(__DIR__ . 
"/../../../../../../vendor/composer/vendor/autoload.php");
    22 require_once(__DIR__ . 
"/../../Base.php");
    33     protected I\Component\SignalGenerator 
$sig_gen;
    37         $this->sig_gen = 
new I\Component\SignalGenerator();
    42         return $this->
getUIFactory()->symbol()->icon()->standard(
"name", 
"aria_label", 
"small", 
false);
    48             public I\Component\SignalGenerator 
$sig_gen;
    50             public function item(): C\Item\Factory
    52                 return new I\Component\Item\Factory();
    55             public function Link(): C\Link\Factory
    57                 return new I\Component\Link\Factory();
    60             public function button(): C\Button\Factory
    62                 return new I\Component\Button\Factory();
    65             public function symbol(): C\Symbol\Factory
    67                 return new I\Component\Symbol\Factory(
    74             public function mainControls(): C\MainControls\Factory
    76                 return new I\Component\MainControls\Factory(
    94         $this->assertInstanceOf(
"ILIAS\\UI\\Component\\Item\\Notification", 
$f->notification(
"title", $this->getIcon()));
   100         $c = 
$f->standard(
"title");
   102         $this->assertEquals(
"title", 
$c->getTitle());
   108         $title_link = $this->
getUIFactory()->link()->standard(
"TestLink", 
"");
   109         $c = 
$f->standard($title_link);
   111         $this->assertEquals(
$c->getTitle(), $title_link);
   118         $c = 
$f->notification(
"title", $this->
getIcon())->withDescription(
"description");
   120         $this->assertEquals(
"description", 
$c->getDescription());
   127         $props = array(
"prop1" => 
"val1", 
"prop2" => 
"val2");
   128         $c = 
$f->notification(
"title", $this->
getIcon())->withProperties($props);
   130         $this->assertEquals(
$c->getProperties(), $props);
   137         $actions = 
new I\Component\Dropdown\Standard(array(
   141         $c = 
$f->notification(
"title", $this->
getIcon())->withActions($actions);
   143         $this->assertEquals(
$c->getActions(), $actions);
   151         $this->assertEquals(
$c->getLeadIcon(), $this->
getIcon());
   154         $this->assertEquals(
$c->withLeadIcon($icon2)->getLeadIcon(), $icon2);
   161         $c = 
$f->notification(
"title", $this->
getIcon())->withCloseAction(
"closeAction");
   163         $this->assertEquals(
"closeAction", 
$c->getCloseAction());
   170         $content = 
new I\Component\Legacy\Legacy(
"someContent", $this->sig_gen);
   171         $c = 
$f->notification(
"title", $this->
getIcon())->withAdditionalContent($content);
   173         $this->assertEquals(
$c->getAdditionalContent(), $content);
   180         $aggregate = 
$f->notification(
"title_aggregate", $this->
getIcon());
   182                ->withAggregateNotifications([$aggregate,$aggregate]);
   185         $this->assertEquals(
$c->getAggregateNotifications(), [$aggregate,$aggregate]);
   192             public array $on_load_code = array();
   194             public function createId(): 
string   199             public function addOnLoadCode(
string $code): 
void   201                 $this->on_load_code[] = $code;
   204             public function getOnLoadCodeAsync(): 
string   209         $props = array(
"prop1" => 
"val1", 
"prop2" => 
"val2");
   210         $content = 
new I\Component\Legacy\Legacy(
"someContent", $this->sig_gen);
   211         $actions = 
new I\Component\Dropdown\Standard(array(
   215         $title_link = $this->
getUIFactory()->link()->standard(
"TestLink", 
"");
   216         $aggregate = 
$f->notification(
"title_aggregate", $this->
getIcon());
   218         $c = 
$f->notification($title_link, $this->
getIcon())
   219             ->withDescription(
"description")
   220             ->withProperties($props)
   221             ->withAdditionalContent($content)
   222             ->withAggregateNotifications([$aggregate])
   223             ->withCloseAction(
"closeAction")
   224             ->withActions($actions)
   227         $html = $this->brutallyTrimHTML(
$r->render(
$c));
   229 <div 
class=
"il-item-notification-replacement-container">
   230         <div 
class=
"il-item il-notification-item" id=
"id">
   232                         <div 
class=
"media-left">
   233                                 <img 
class=
"icon name small" src=
"./assets/images/standard/icon_default.svg" alt=
"aria_label"/>
   235                         <div 
class=
"media-body">
   236                                 <h4 
class=
"il-item-notification-title">
   237                                         <a href=
"">TestLink</a>
   239                                 <
button type=
"button" class=
"close" aria-label=
"close" id=
"id">
   240                                         <span aria-hidden=
"true">×</span>
   242                                 <div 
class=
"il-item-description">description</div>
   243                                 <div 
class=
"dropdown" id=
"id">
   244                                         <
button class=
"btn btn-default dropdown-toggle" type=
"button" aria-label=
"actions" aria-haspopup=
"true" aria-expanded=
"false" aria-controls=
"id_menu">
   245                                                 <span 
class=
"caret"></span>
   247                                         <ul 
id=
"id_menu" class=
"dropdown-menu">
   249                                                         <
button class=
"btn btn-link" data-action=
"https://www.ilias.de" id=
"id">
ILIAS</button>
   252                                                         <button 
class=
"btn btn-link" data-action=
"https://www.github.com" id=
"id">GitHub</button>
   256                                 <div 
class=
"il-item-additional-content">someContent</div>
   257                                 <hr 
class=
"il-item-divider">
   258                                         <div 
class=
"row il-item-properties">
   259                         <div 
class=
"col-sm-12 il-multi-line-cap-3">
   260                             <span 
class=
"il-item-property-name">prop1</span><span 
class=
"il-item-property-value">val1</span>
   262                         <div 
class=
"col-sm-12 il-multi-line-cap-3">
   263                             <span 
class=
"il-item-property-name">prop2</span><span 
class=
"il-item-property-value">val2</span>
   266                                         <div 
class=
"il-aggregate-notifications" data-aggregatedby=
"id">
   267                                                 <div 
class=
"il-maincontrols-slate il-maincontrols-slate-notification">
   268                                                         <div 
class=
"il-maincontrols-slate-notification-title">
   269                                                                 <button 
class=
"btn btn-bulky" data-action=
"">
   270                                                                         <span 
class=
"glyph" role=
"img">
   271                                                                                 <span 
class=
"glyphicon glyphicon-chevron-left" aria-hidden=
"true"></span>
   273                                                                         <span 
class=
"bulky-label">
back</span>
   276                                                         <div 
class=
"il-maincontrols-slate-content">
   277                                                                 <div 
class=
"il-item-notification-replacement-container">
   278                                                                         <div 
class=
"il-item il-notification-item" id=
"id">
   280                                                                                         <div 
class=
"media-left">
   281                                                 <img 
class=
"icon name small" src=
"./assets/images/standard/icon_default.svg" alt=
"aria_label"/>
   283                                                                                         <div 
class=
"media-body">
   284                                                                                                 <h4 
class=
"il-item-notification-title">title_aggregate</h4>
   285                                                                                                 <div 
class=
"il-aggregate-notifications" data-aggregatedby=
"id">
   286                                                                                                         <div 
class=
"il-maincontrols-slate il-maincontrols-slate-notification">
   287                                                                                                                 <div 
class=
"il-maincontrols-slate-notification-title">
   288                                                                                                                         <button 
class=
"btn btn-bulky" data-action=
"">
   289                                                                                                                                 <span 
class=
"glyph" role=
"img">
   290                                                                                                                                         <span 
class=
"glyphicon glyphicon-chevron-left" aria-hidden=
"true"></span>
   292                                                                                                                                 <span 
class=
"bulky-label">
back</span>
   295                                                                                                                 <div 
class=
"il-maincontrols-slate-content"></div>
   311         $this->assertEquals($this->brutallyTrimHTML($expected), $html);
 
button(string $caption, string $cmd)
 
Interface Observer  Contains several chained tasks and infos about them. 
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
back()
 description: > Example for rendring a back glyph. 
 
testWithAggregateNotifications()
 
Provides methods to interface with javascript. 
 
testImplementsFactoryInterface()
 
testRenderFullyFeatured()
 
I Component SignalGenerator $sig_gen
 
testWithAdditionalContent()