| Total Complexity | 5 |
| Total Lines | 48 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | class OptGroup extends AbstractValuableElement |
||
| 10 | { |
||
| 11 | use MultiValueSelectionTrait; |
||
| 12 | use RendersOptionsTrait; |
||
| 13 | |||
| 14 | protected $value = []; |
||
| 15 | |||
| 16 | protected string $label; |
||
| 17 | |||
| 18 | protected bool $disabled = false; |
||
| 19 | |||
| 20 | public function __construct(string $label) |
||
| 25 | } |
||
| 26 | |||
| 27 | public function isDisabled(): bool |
||
| 28 | { |
||
| 29 | return $this->disabled; |
||
| 30 | } |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @return $this |
||
| 34 | */ |
||
| 35 | public function setDisabled(bool $disabled): OptGroup |
||
| 40 | } |
||
| 41 | |||
| 42 | /** |
||
| 43 | * @return $this |
||
| 44 | */ |
||
| 45 | protected function resolveAttributes(): OptGroup |
||
| 46 | { |
||
| 47 | parent::resolveAttributes() |
||
| 48 | ->addAttribute('label', $this->label) |
||
| 49 | ->addAttribute('disabled', $this->disabled); |
||
| 50 | |||
| 51 | return $this; |
||
| 52 | } |
||
| 53 | |||
| 54 | protected function renderHtmlMarkup(): string |
||
| 57 | } |
||
| 58 | } |
||
| 59 |