Conditions | 2 |
Paths | 2 |
Total Lines | 18 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
7 | public static function prepare($name, $options = [], $value = null, $properties = []) |
||
8 | { |
||
9 | // Define the total of columns |
||
10 | $colsSize = 12 / $properties['config']['cols']; |
||
11 | |||
12 | $html = '<div class="row i-checks">'; |
||
13 | foreach ($options as $key => $option) { |
||
14 | $uniqueId = uniqid('opt', true).md5(mt_rand(1, 1000)); |
||
15 | $html .= |
||
16 | '<div class="col-md-'.$colsSize.' col-xs-12">'. |
||
17 | \Form::checkbox($name.'[]', $key, in_array($key, (array) $value), ['id' => $uniqueId]). |
||
18 | \Form::label($uniqueId, $option). |
||
19 | '</div>'; |
||
20 | } |
||
21 | $html .= '</div>'; |
||
22 | |||
23 | return $html; |
||
24 | } |
||
25 | } |
||
26 |