48 {
52 public function getRows(
53 Component\Table\OrderingRowBuilder $row_builder,
54 array $visible_column_ids
55 ): \Generator {
57 yield;
58 }
59 }
60 };
61 $columns = [
62 'f1' =>
$f->text(
"Field 1")->withIndex(1),
63 'f2' =>
$f->text(
"Field 2")->withIndex(2),
64 'f3' =>
$f->number(
"Field 3")->withIndex(3)
65 ];
66 $uri = new Data\URI('https://localhost');
69
70 $actual =
$renderer->renderOrderingTable($table, $this->getDefaultRenderer());
71 $expected = <<<EOT
72<div class="c-table-ordering" id="id_1"><h2 class="ilHeader" id="id_1_label"></h2>
73 <div class="viewcontrols">
74 <
form class=
"il-viewcontrols-form l-bar__space-keeper" method=
"get" id=
"id_2"></
form>
75 </div>
76 <
form method=
"post" class=
"c-table-data__table-wrapper c-table-ordering__form" action=
"https://localhost">
77 <table class="c-table-data__table" aria-labelledby="id_1_label" aria-colcount="5" role="grid">
78 <thead>
79 <tr class="c-table-data__header c-table-data__row">
80 <th class="c-table-data__header c-table-data__cell c-table-data__header__rowselection" tabindex="-1" aria-colindex="1"></th>
81 <th class="c-table-data__header c-table-data__cell c-table-data__cell--number" tabindex="-1" aria-colindex="2">
82 <div class="c-table-data__header__resize-wrapper">table_posinput_col_title</div>
83 </th>
84 <th class="c-table-data__header c-table-data__cell c-table-data__cell--text" tabindex="-1" aria-colindex="3">
85 <div class="c-table-data__header__resize-wrapper">Field 1</div>
86 </th>
87 <th class="c-table-data__header c-table-data__cell c-table-data__cell--text" tabindex="-1" aria-colindex="4">
88 <div class="c-table-data__header__resize-wrapper">Field 2</div>
89 </th>
90 <th class="c-table-data__header c-table-data__cell c-table-data__cell--number" tabindex="-1" aria-colindex="5">
91 <div class="c-table-data__header__resize-wrapper">Field 3</div>
92 </th>
93 </tr>
94 </thead>
95 <tbody class="c-table-data__body">
96 <tr>
97 <td class="c-table-data__cell c-table-data__cell--multiaction" colspan="5">
98 <div class="l-bar__space-keeper">
99 <div class="l-bar__element">
100 <div class="c-table-data__multiaction-triggerer"></div>
101 </div>
102 <div class="l-bar__element">
103 <
button class=
"btn btn-default" data-action=
"" id=
"id_1">sorting_save</
button>
104 </div>
105 </div>
106 </td>
107 </tr>
108 </tbody>
109 </table>
111 <div class="c-table-data__async_modal_container"></div>
112 <div class="c-table-data__async_message modal" role="dialog" id="id_1_msgmodal">
113 <div class="modal-dialog" role="document">
114 <div class="modal-content">
115 <div class="modal-header">
116 <
button type=
"button" class=
"close" data-dismiss=
"modal" aria-label=
"close">
117 <span aria-hidden=
"true">×</span></
button>
118 </div>
119 <div class="c-table-data__async_messageresponse modal-body"></div>
120 </div>
121 </div>
122 </div>
123</div>
124EOT;
125 $this->assertEquals($this->brutallyTrimHTML($expected), $this->brutallyTrimHTML($actual));
126 }
form( $class_path, string $cmd, string $submit_caption="")
button(string $caption, string $cmd)
if(!file_exists('../ilias.ini.php'))