Definition at line 29 of file LauncherInlineTest.php.
◆ getIconFactory()
LauncherInlineTest::getIconFactory |
( |
| ) |
|
|
protected |
◆ getInputFactory()
LauncherInlineTest::getInputFactory |
( |
| ) |
|
|
protected |
◆ getLauncher()
LauncherInlineTest::getLauncher |
( |
| ) |
|
|
protected |
◆ getMessageBox()
LauncherInlineTest::getMessageBox |
( |
| ) |
|
|
protected |
◆ getModalFactory()
LauncherInlineTest::getModalFactory |
( |
| ) |
|
|
protected |
◆ getUIFactory()
LauncherInlineTest::getUIFactory |
( |
| ) |
|
Definition at line 65 of file LauncherInlineTest.php.
References ILIAS\Repository\button(), getInputFactory(), ILIAS\Repository\modal(), and ILIAS\Repository\symbol().
68 public I\SignalGenerator $sig_gen;
69 public I\Input\Field\Factory $input_factory;
73 return new I\Button\Factory();
75 public function symbol():
I\Symbol\Factory
77 return new I\Symbol\Factory(
78 new I\Symbol\
Icon\Factory(),
79 new I\Symbol\Glyph\Factory(),
80 new I\Symbol\Avatar\Factory()
83 public function modal():
I\Modal\Factory
85 return new I\Modal\Factory(
87 new I\Modal\InterruptiveItem\Factory(),
92 $factory->sig_gen =
new I\SignalGenerator();
button(string $caption, string $cmd)
modal(string $title="", string $cancel_label="")
◆ getURI()
LauncherInlineTest::getURI |
( |
| ) |
|
|
protected |
◆ setUp()
LauncherInlineTest::setUp |
( |
| ) |
|
◆ testLauncherInlineBasicModifier()
LauncherInlineTest::testLauncherInlineBasicModifier |
( |
| ) |
|
Definition at line 137 of file LauncherInlineTest.php.
References getIconFactory(), getLauncher(), and getMessageBox().
141 $some_submit_label =
'some submit label';
142 $some_cancel_label =
'some cancel label';
144 ->withDescription(
'some description')
145 ->withButtonLabel(
'different label',
false)
146 ->withStatusMessageBox($msg)
147 ->withStatusIcon($icon)
148 ->withModalSubmitLabel($some_submit_label)
149 ->withModalCancelLabel($some_cancel_label)
152 $this->assertEquals($this->df->link(
'LaunchSomething', $this->getURI()), $l->getTarget());
153 $this->assertEquals(
'different label', $l->getButtonLabel());
154 $this->assertfalse($l->isLaunchable());
155 $this->assertEquals($msg, $l->getStatusMessageBox());
156 $this->assertEquals($icon, $l->getStatusIcon());
157 $this->assertNull($l->getModal());
158 $this->assertEquals($l->getModalSubmitLabel(), $some_submit_label);
159 $this->assertEquals($l->getModalCancelLabel(), $some_cancel_label);
◆ testLauncherInlineConstruction()
LauncherInlineTest::testLauncherInlineConstruction |
( |
| ) |
|
Definition at line 123 of file LauncherInlineTest.php.
References getLauncher().
126 $this->assertInstanceOf(
C\Launcher\Inline::class, $l);
127 $this->assertEquals($this->df->link(
'LaunchSomething', $this->getURI()), $l->getTarget());
128 $this->assertEquals(
'LaunchSomething', $l->getButtonLabel());
129 $this->assertTrue($l->isLaunchable());
130 $this->assertNull($l->getStatusIcon());
131 $this->assertNull($l->getStatusMessageBox());
132 $this->assertNull($l->getModal());
133 $this->assertNull($l->getModalSubmitLabel());
134 $this->assertNull($l->getModalCancelLabel());
◆ testLauncherInlineRendering()
LauncherInlineTest::testLauncherInlineRendering |
( |
| ) |
|
Definition at line 192 of file LauncherInlineTest.php.
References $r, ILIAS\Repository\button(), ILIAS\UI\examples\Input\Field\Checkbox\disabled(), ILIAS\Repository\form(), getIconFactory(), getInputFactory(), getLauncher(), getMessageBox(), null, and ILIAS\Repository\ui().
195 $group = $ff->group([$ff->checkbox(
'Understood',
'ok')]);
196 $evaluation = fn(
Result $result, Launcher & $launcher) =>
true;
201 ->withDescription(
'some description')
202 ->withButtonLabel(
'different label',
false)
203 ->withStatusMessageBox($msg)
204 ->withStatusIcon($icon)
205 ->withInputs($group, $evaluation, $msg)
206 ->withModalSubmitLabel(
'some submit label')
207 ->withModalCancelLabel(
'some cancel label')
211 <div
class=
"c-launcher c-launcher--inline">
212 <div
class=
"c-launcher__status">
213 <div
class=
"c-launcher__status__message">$msg_html
215 <div
class=
"c-launcher__status__icon"><img
class=
"icon course small" src=
"./assets/images/standard/icon_default.svg" alt=
"some icon"/></div>
217 <div
class=
"c-launcher__description">
220 <
button class=
"btn btn-bulky" id=
"id_5" disabled=
"disabled"><span
class=
"glyph" role=
"img"><span
class=
"glyphicon glyphicon-launch" aria-hidden=
"true"></span></span><span
class=
"bulky-label">different label</span></button>
221 <div
class=
"c-launcher__form">
222 <dialog
class=
"c-modal il-modal-roundtrip" tabindex=
"-1" id=
"id_1">
223 <div
class=
"modal-dialog" role=
"document" data-replace-marker=
"component">
224 <div
class=
"modal-content">
225 <div
class=
"modal-header">
226 <
form><button formmethod=
"dialog" class=
"close" aria-label=
"close"><span aria-hidden=
"true">×</span></button></
form>
227 <h1
class=
"modal-title">different label</h1>
229 <div
class=
"modal-body">$msg_html
230 <
form id=
"id_3" class=
"c-form c-form--horizontal" enctype=
"multipart/form-data" action=
"http://localhost/ilias.php" method=
"post">
231 <fieldset
class=
"c-input" data-il-
ui-component=
"checkbox-field-input" data-il-
ui-input-name=
"form/input_0">
232 <label
for=
"id_2">Understood</label>
233 <div
class=
"c-input__field">
234 <input type=
"checkbox" id=
"id_2" value=
"checked" name=
"form/input_0" class=
"c-field-checkbox" />
236 <div
class=
"c-input__help-byline">ok</div>
240 <div
class=
"modal-footer">
242 <button
class=
"btn btn-default" id=
"id_4">some submit label</button>
243 <button formmethod=
"dialog" class=
"btn btn-default" data-dismiss=
"modal">some cancel label</button>
252 $r = $this->getDefaultRenderer(
null, [$msg]);
253 $actual =
$r->render($l);
255 $this->brutallyTrimSignals($this->brutallyTrimHTML($expected)),
256 $this->brutallyTrimSignals($this->brutallyTrimHTML($actual))
button(string $caption, string $cmd)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
form( $class_path, string $cmd, string $submit_caption="")
◆ testLauncherInlineWithFields()
LauncherInlineTest::testLauncherInlineWithFields |
( |
| ) |
|
Definition at line 162 of file LauncherInlineTest.php.
References getInputFactory(), getLauncher(), and getMessageBox().
165 $field = $ff->checkbox(
'Understood',
'ok');
166 $group = $ff->group([$field]);
167 $evaluation = fn(
Result $result, Launcher & $launcher) =>
true;
170 ->withInputs($group, $evaluation, $instruction);
172 $this->assertEquals($evaluation, $l->getEvaluation());
173 $this->assertInstanceOf(
C\Modal\Roundtrip::class, $l->getModal());
177 $l->getModal()->getContent()[0]
180 $ns =
new class () extends
I\Input\FormInputNameSource {
181 public function getNewName(): string
183 return 'form/input_0';
187 [$field->withNameFrom($ns)],
188 $l->getModal()->getInputs()
◆ $df
ILIAS Data Factory LauncherInlineTest::$df |
|
protected |
◆ $language
ILIAS Language Language LauncherInlineTest::$language |
|
protected |
The documentation for this class was generated from the following file: