5require_once(__DIR__ .
"/../../../../libs/composer/vendor/autoload.php");
6require_once(__DIR__ .
"/../../Base.php");
8use \ILIAS\UI\Component as
C;
9use \ILIAS\UI\Implementation as I;
22 return new I\Component\Panel\Listing\Factory();
29 $std_list =
$f->standard(
"List Title", array(
30 new I\Component\Item\Group(
"Subtitle 1", array(
31 new I\Component\Item\Standard(
"title1"),
32 new I\Component\Item\Standard(
"title2")
34 new I\Component\Item\Group(
"Subtitle 2", array(
35 new I\Component\Item\Standard(
"title3")
39 $this->assertInstanceOf(
"ILIAS\\UI\\Component\\Panel\\Listing\\Standard", $std_list);
47 new I\Component\Item\Group(
"Subtitle 1", array(
48 new I\Component\Item\Standard(
"title1"),
49 new I\Component\Item\Standard(
"title2")
51 new I\Component\Item\Group(
"Subtitle 2", array(
52 new I\Component\Item\Standard(
"title3")
56 $c =
$f->standard(
"title", $groups);
58 $this->assertEquals(
$c->getTitle(),
"title");
59 $this->assertEquals(
$c->getItemGroups(), $groups);
66 $actions =
new I\Component\Dropdown\Standard(array(
67 new I\Component\
Button\Shy(
"ILIAS",
"https://www.ilias.de"),
68 new I\Component\
Button\Shy(
"GitHub",
"https://www.github.com")
73 $c =
$f->standard(
"title", $groups)
74 ->withActions($actions);
76 $this->assertEquals(
$c->getActions(), $actions);
85 new I\Component\Item\Group(
"Subtitle 1", array(
86 new I\Component\Item\Standard(
"title1"),
87 new I\Component\Item\Standard(
"title2")
89 new I\Component\Item\Group(
"Subtitle 2", array(
90 new I\Component\Item\Standard(
"title3")
94 $c =
$f->standard(
"title", $groups);
96 $html = $r->render(
$c);
99<div
class=
"panel il-panel-listing-std-container clearfix">
101 <div
class=
"il-item-group">
103 <div
class=
"il-item-group-items">
104 <div
class=
"il-std-item-container"><div
class=
"il-item il-std-item ">
105 <div
class=
"il-item-title">title1</div>
106 </div></div><div
class=
"il-std-item-container"><div
class=
"il-item il-std-item ">
107 <div
class=
"il-item-title">title2</div>
110 </div><div
class=
"il-item-group">
112 <div
class=
"il-item-group-items">
113 <div
class=
"il-std-item-container"><div
class=
"il-item il-std-item ">
114 <div
class=
"il-item-title">title3</div>
133 $actions =
new I\Component\Dropdown\Standard(array(
134 new I\Component\
Button\Shy(
"ILIAS",
"https://www.ilias.de"),
135 new I\Component\
Button\Shy(
"GitHub",
"https://www.github.com")
138 $c =
$f->standard(
"title", $groups)
139 ->withActions($actions);
141 $html = $r->render(
$c);
144<div
class=
"panel il-panel-listing-std-container clearfix">
145<h2>title</h2><div
class=
"dropdown"><button
class=
"btn btn-default dropdown-toggle" type=
"button" data-toggle=
"dropdown" aria-label=
"actions" aria-haspopup=
"true" aria-expanded=
"false"> <span
class=
"caret"></span></button>
146<ul
class=
"dropdown-menu">
147 <li><button
class=
"btn btn-link" data-action=
"https://www.ilias.de" id=
"id_1">
ILIAS</button></li>
148 <li><button
class=
"btn btn-link" data-action=
"https://www.github.com" id=
"id_2">GitHub</button></li>
An exception for terminatinating execution or to throw for unit testing.
Provides common functionality for UI tests.
assertHTMLEquals($expected_html_as_string, $html_as_string)
getDefaultRenderer(JavaScriptBinding $js_binding=null)
brutallyTrimHTML($html)
A more radical version of normalizeHTML.
test_get_title_get_groups()
test_implements_factory_interface()
test_render_with_actions()
Class ChatMainBarProvider \MainMenu\Provider.