| Total Complexity | 4 |
| Total Lines | 40 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | abstract class ButtonAttributes extends GlobalAttributes |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * Specifies the form element the tag input element belongs to. The value of this attribute must be the id |
||
| 13 | * attribute of a {@see Form} element in the same document. |
||
| 14 | * |
||
| 15 | * @param string $value |
||
| 16 | * |
||
| 17 | * @return static |
||
| 18 | * |
||
| 19 | * @link https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#attr-fae-form |
||
| 20 | */ |
||
| 21 | 6 | public function form(string $value): self |
|
| 22 | { |
||
| 23 | 6 | $new = clone $this; |
|
| 24 | 6 | $new->attributes['form'] = $value; |
|
| 25 | 6 | return $new; |
|
| 26 | } |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Set build attributes for the widget. |
||
| 30 | * |
||
| 31 | * @param array $attributes $value |
||
| 32 | * @param string $suffix The suffix of the attribute name. |
||
| 33 | * |
||
| 34 | * @return array |
||
| 35 | */ |
||
| 36 | 74 | protected function build(array $attributes, string $suffix): array |
|
| 49 | } |
||
| 50 | } |
||
| 51 |