src/Forms/Form.php
public function addAttribute(string $name, string $value, $overwrite = false): FieldTypeInterface
    {
        if (isset($this->options['attributes'][$name]) && ! $overwrite) {
            $this->options['attributes'][$name] .= ' '.$value;
        } else {
            $this->options['attributes'][$name] = $value;
        }

        return $this;
    }
public function addAttribute(string $name, string $value, $overwrite = false): FieldTypeInterface
    {
        if (isset($this->options['attributes'][$name]) && ! $overwrite) {
            $this->options['attributes'][$name] .= ' '.$value;
        } else {
            $this->options['attributes'][$name] = $value;
        }

        return $this;
    }
public function addAttribute ( string $ name , string $ value , $ overwrite = false ) : FieldTypeInterface { if ( isset ( $ this -> options [ 'attributes' ] [ $ name ] ) && ! $ overwrite ) { $ this -> options [ 'attributes' ] [ $ name ] .= ' ' . $ value ; } else { $ this -> options [ 'attributes' ] [ $ name ] = $ value ; } return $ this ; }
Add an attribute to the field.

@param string $name
@param string $value
@param bool   $overwrite

@return FieldTypeInterface
Add an attribute to the field .