5 require_once(
"libs/composer/vendor/autoload.php");
6 require_once(__DIR__ .
"/../../../Base.php");
8 use \ILIAS\UI\Component as
C;
9 use \ILIAS\UI\Implementation\Component as
I;
10 use \ILIAS\UI\Implementation\Component\MainControls\Slate\Notification;
24 return $this->
getUIFactory()->symbol()->icon()->standard(
"name",
"aria_label",
"small",
false);
29 $factory =
new class extends NoUIFactory {
30 public function button()
32 return new I\Button\Factory($this->sig_gen);
36 return new I\Symbol\Factory(
37 new I\Symbol\Icon\Factory(),
38 new I\Symbol\Glyph\Factory(),
39 new I\Symbol\Avatar\Factory()
42 public function item()
44 return new I\Item\Factory();
46 public function mainControls() : C\MainControls\Factory
48 return new I\MainControls\Factory(
50 new I\MainControls\Slate\Factory(
57 public function icon() : I\Symbol\Icon\Factory
59 new I\Symbol\Icon\Factory();
69 $notificatino_slate = $this->
getUIFactory()->mainControls()->slate()->notification(
"title", []);
71 $this->assertInstanceOf(
"ILIAS\\UI\\Component\\MainControls\\Slate\\Notification", $notificatino_slate);
77 ->withDescription(
"description");
79 $notification_slate = $this->
getUIFactory()->mainControls()->slate()->notification(
"title", [$item,$item]);
80 $this->assertEquals($notification_slate->getName(),
"title");
81 $this->assertEquals($notification_slate->getContents(), [$item,$item]);
88 ->withDescription(
"description");
89 $notification_slate = $this->
getUIFactory()->mainControls()->slate()->notification(
"title", [$item,$item]);
90 $this->assertEquals($notification_slate->getContents(), [$item,$item]);
91 $notification_slate = $notification_slate->withAdditionalEntry($item);
92 $this->assertEquals($notification_slate->getContents(), [$item,$item,$item]);
98 $notification_slate = $this->
getUIFactory()->mainControls()->slate()->notification(
"slate title", [$item]);
102 $html = $r->render($notification_slate);
105 <div
class=
"il-maincontrols-slate il-maincontrols-slate-notification">
106 <div
class=
"il-maincontrols-slate-notification-title">slate title</div>
107 <div
class=
"il-maincontrols-slate-content">
108 <div
class=
"il-item-notification-replacement-container">
109 <div
class=
"il-item il-notification-item" id=
"id_1">
111 <div
class=
"media-left">
112 <img
class=
"icon name small" src=
"./templates/default/images/icon_default.svg" alt=
"aria_label"/>
114 <div
class=
"media-body">
115 <h4
class=
"il-item-notification-title">item title</h4>
116 <div
class=
"il-aggregate-notifications" data-aggregatedby=
"id_1">
117 <div
class=
"il-maincontrols-slate il-maincontrols-slate-notification">
118 <div
class=
"il-maincontrols-slate-notification-title">
119 <button
class=
"btn btn-bulky" data-action=
"">
120 <span
class=
"glyph" aria-label=
"back" role=
"img">
121 <span
class=
"glyphicon glyphicon-chevron-left" aria-hidden=
"true"></span>
123 <span
class=
"bulky-label">
back</span>
126 <div
class=
"il-maincontrols-slate-content"></div>
Class ChatMainBarProvider .
testWithAdditionalEntry()
testImplementsFactoryInterface()
Provides common functionality for UI tests.
testGenerationByFactory()
brutallyTrimHTML($html)
A more radical version of normalizeHTML.
testRenderingWithSubslateAndButton()
getDefaultRenderer(JavaScriptBinding $js_binding=null, $with_stub_renderings=[])