5require_once(__DIR__ . 
"/../../../../../libs/composer/vendor/autoload.php");
 
    6require_once(__DIR__ . 
"/../../../Base.php");
 
   10use \ILIAS\UI\Component\Input\Field;
 
   13use \ILIAS\Transformation;
 
   28            new Validation\
Factory($df, $this->createMock(\ilLanguage::class)),
 
   41        $ms = 
$f->multiSelect(
"label", 
$options, 
"byline");
 
   42        $this->assertInstanceOf(Field\Input::class, $ms);
 
   43        $this->assertInstanceOf(Field\MultiSelect::class, $ms);
 
   54        $ms = 
$f->multiSelect(
"label", 
$options, 
"byline");
 
   55        $this->assertEquals(
$options, $ms->getOptions());
 
   61        $this->expectException(\InvalidArgumentException::class);
 
   67        $ms = 
$f->multiSelect(
"label", 
$options, 
"byline");
 
   68        $ms = $ms->withInput(
new class() implements 
PostData {
 
   69            public function getOr($_, $__)
 
   73            public function get($_)
 
   77        $content = $ms->getContent();
 
   89        $ms = 
$f->multiSelect(
"label", 
$options, 
"byline")
 
   90            ->withNameFrom($this->name_source);
 
   92        $name = $ms->getName();
 
   93        $label = $ms->getLabel();
 
   94        $byline = $ms->getByline();
 
   96            . 
"<div class=\"form-group row\">" 
   97                . 
"<label for=\"$name\" class=\"control-label col-sm-3\">$label</label>" 
   98                . 
"<div class=\"col-sm-9\">" 
   99                    . 
"<ul class=\"il-input-multiselect\">";
 
  101        foreach (
$options as $opt_value => $opt_label) {
 
  104                            . 
"<input type=\"checkbox\" name=\"$name" . 
"[]\" value=\"$opt_value\" />" 
  105                            . 
"<span>$opt_label</span>" 
  111                    . 
"<div class=\"help-block\">$byline</div>" 
  127        $ms = 
$f->multiSelect(
"label", 
$options, 
"byline")
 
  128            ->withNameFrom($this->name_source)
 
  129            ->withValue([$value]);
 
  131        $name = $ms->getName();
 
  132        $label = $ms->getLabel();
 
  133        $byline = $ms->getByline();
 
  135            . 
"<div class=\"form-group row\">" 
  136                . 
"<label for=\"$name\" class=\"control-label col-sm-3\">$label</label>" 
  137                . 
"<div class=\"col-sm-9\">" 
  138                    . 
"<ul class=\"il-input-multiselect\">";
 
  140        foreach (
$options as $opt_value => $opt_label) {
 
  141            if ($opt_value === $value) {
 
  144                            . 
"<input type=\"checkbox\" name=\"$name" . 
"[]\" value=\"$opt_value\" checked=\"checked\" />" 
  145                            . 
"<span>$opt_label</span>" 
  150                            . 
"<input type=\"checkbox\" name=\"$name" . 
"[]\" value=\"$opt_value\" />" 
  151                            . 
"<span>$opt_label</span>" 
  158                    . 
"<div class=\"help-block\">$byline</div>" 
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)
Describes how Input-Elements want to interact with posted data.