| @@ 118-124 (lines=7) @@ | ||
| 115 | // from the options, the element should manipulate the global tabulator index counter |
|
| 116 | self::$tabIndex--; |
|
| 117 | ||
| 118 | foreach ($options as $option) { |
|
| 119 | $checked = !empty($option['checked']); |
|
| 120 | $group = !empty($option['group']) ? $option['group'] : 'Default'; |
|
| 121 | $attributes = isset($option['attributes']) ? $option['attributes'] : []; |
|
| 122 | $attributes['tabindex'] = self::$tabIndex++; |
|
| 123 | $this->setOption($option['label'], $option['value'], $checked, $group, $attributes); |
|
| 124 | } |
|
| 125 | ||
| 126 | return $this; |
|
| 127 | } |
|
| @@ 99-104 (lines=6) @@ | ||
| 96 | $this->options = []; |
|
| 97 | $this->optionGroups = []; |
|
| 98 | ||
| 99 | foreach ($options as $option) { |
|
| 100 | $checked = !empty($option['checked']); |
|
| 101 | $group = !empty($option['group']) ? $option['group'] : 'Default'; |
|
| 102 | $attributes = isset($option['attributes']) ? $option['attributes'] : []; |
|
| 103 | $this->setOption($option['label'], $option['value'], $checked, $group, $attributes); |
|
| 104 | } |
|
| 105 | ||
| 106 | return $this; |
|
| 107 | } |
|