src/Components/Select.php

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
<?php

namespace Galahad\Aire\Components;

use Galahad\Aire\Elements\Element;
use Galahad\Aire\Elements\Select as SelectElement;
use Galahad\Aire\Support\Facades\Aire;

class Select extends ElementComponent
{
    use RequiresOptionsAttribute;
    
    public function __construct(
        $options = null,
        ?bool $autoFocus = null,
        ?bool $disabled = null,
        $form = null,
        ?bool $multiple = null,
        $name = null,
        ?bool $required = null,
        $size = null,
        ?array $data = null,
        $addClass = null,
        $removeClass = null,
        $accessKey = null,
        $class = null,
        ?bool $contentEditable = null,
        $contextMenu = null,
        $dir = null,
        $draggable = null,
        $dropZone = null,
        ?bool $hide = null,
        $id = null,
        $lang = null,
        $role = null,
        ?bool $spellCheck = null,
        $style = null,
        $tabIndex = null,
        $title = null,
        $ariaActiveDescendant = null,
        ?bool $ariaAtomic = null,
        ?bool $ariaBusy = null,
        $ariaControls = null,
        $ariaDescribedBy = null,
        $ariaDisabled = null,
        $ariaDropEffect = null,
        $ariaFlowTo = null,
        $ariaGrabbed = null,
        ?bool $ariaHasPopup = null,
        ?bool $ariaHidden = null,
        $ariaInvalid = null,
        $ariaLabel = null,
        $ariaLabelledBy = null,
        $ariaLive = null,
        $ariaOwns = null,
        $ariaRelevant = null,
        ?bool $grouped = null,
        ?bool $withoutGroup = null,
        $variant = null,
        ?string $variants = null,
        $defaultValue = null,
        $value = null,
        ?array $prependEmptyOption = null,
        ?string $label = null,
        ?string $helpText = null,
        $validated = null,
        $valid = null,
        $invalid = null,
        $errors = null,
        ?string $prepend = null,
        ?string $append = null,
        $groupData = null,
        $groupAccessKey = null,
        $groupClass = null,
        ?bool $groupContentEditable = null,
        $groupContextMenu = null,
        $groupDir = null,
        $groupDraggable = null,
        $groupDropZone = null,
        ?bool $groupHide = null,
        $groupId = null,
        $groupLang = null,
        $groupRole = null,
        ?bool $groupSpellCheck = null,
        $groupStyle = null,
        $groupTabIndex = null,
        $groupTitle = null,
        $groupAriaActiveDescendant = null,
        ?bool $groupAriaAtomic = null,
        ?bool $groupAriaBusy = null,
        $groupAriaControls = null,
        $groupAriaDescribedBy = null,
        $groupAriaDisabled = null,
        $groupAriaDropEffect = null,
        $groupAriaFlowTo = null,
        $groupAriaGrabbed = null,
        ?bool $groupAriaHasPopup = null,
        ?bool $groupAriaHidden = null,
        $groupAriaInvalid = null,
        $groupAriaLabel = null,
        $groupAriaLabelledBy = null,
        $groupAriaLive = null,
        $groupAriaOwns = null,
        $groupAriaRelevant = null,
        $groupAddClass = null,
        $groupRemoveClass = null
    ) {
        $this->options = $options ?? [];
        
        $this->createElement(SelectElement::class, compact(
            'autoFocus',
            'disabled',
            'form',
            'multiple',
            'name',
            'required',
            'size',
            'data',
            'addClass',
            'removeClass',
            'accessKey',
            'class',
            'contentEditable',
            'contextMenu',
            'dir',
            'draggable',
            'dropZone',
            'hide',
            'id',
            'lang',
            'role',
            'spellCheck',
            'style',
            'tabIndex',
            'title',
            'ariaActiveDescendant',
            'ariaAtomic',
            'ariaBusy',
            'ariaControls',
            'ariaDescribedBy',
            'ariaDisabled',
            'ariaDropEffect',
            'ariaFlowTo',
            'ariaGrabbed',
            'ariaHasPopup',
            'ariaHidden',
            'ariaInvalid',
            'ariaLabel',
            'ariaLabelledBy',
            'ariaLive',
            'ariaOwns',
            'ariaRelevant',
            'grouped',
            'withoutGroup',
            'variant',
            'variants',
            'defaultValue',
            'value',
            'prependEmptyOption',
            'label',
            'helpText',
            'validated',
            'valid',
            'invalid',
            'errors',
            'prepend',
            'append',
            'groupData',
            'groupAccessKey',
            'groupClass',
            'groupContentEditable',
            'groupContextMenu',
            'groupDir',
            'groupDraggable',
            'groupDropZone',
            'groupHide',
            'groupId',
            'groupLang',
            'groupRole',
            'groupSpellCheck',
            'groupStyle',
            'groupTabIndex',
            'groupTitle',
            'groupAriaActiveDescendant',
            'groupAriaAtomic',
            'groupAriaBusy',
            'groupAriaControls',
            'groupAriaDescribedBy',
            'groupAriaDisabled',
            'groupAriaDropEffect',
            'groupAriaFlowTo',
            'groupAriaGrabbed',
            'groupAriaHasPopup',
            'groupAriaHidden',
            'groupAriaInvalid',
            'groupAriaLabel',
            'groupAriaLabelledBy',
            'groupAriaLive',
            'groupAriaOwns',
            'groupAriaRelevant',
            'groupAddClass',
            'groupRemoveClass'
        ));
    }
}