src/Bootstrap/Traits/BuildsForms.php
public function select($name = null, $options = [], $value = null): Select
    {
        $value = $this->getFieldValue($name, $value);
        $element = new Select($this->formState);

        return $element
            ->nameIf($name, $name)
            ->idIf($name, field_name_to_id($name))
            ->options($options)
            ->valueIf($value !== null, $value);
    }
public function select($name = null, $options = [], $value = null): Select
    {
        $value = $this->getFieldValue($name, $value);
        $element = new Select($this->formState);

        return $element
            ->nameIf($name, $name)
            ->idIf($name, field_name_to_id($name))
            ->options($options)
            ->valueIf($value !== null, $value);
    }
@param string|null          $name
@param array|iterable       $options
@param string|iterable|null $value

@return \MarvinLabs\Html\Bootstrap\Elements\Select