src/Forms/Fields/Types/BaseType.php
public function getDefaultOptions(): array
    {
        // Setup default validation rules.
        $this->defaultOptions['rules'] = $this->rules;

        // Setup default messages.
        $this->defaultOptions['messages'] = $this->messages;

        // Setup default placeholder.
        $this->defaultOptions['placeholder'] = $this->placeholder ?? $this->getBaseName();

        // Setup default label.
        $this->defaultOptions['label'] = $this->label ?? ucfirst(str_replace(['-', '_'], ' ', $this->getBaseName()));

        return $this->defaultOptions;
    }
public function getDefaultOptions(): array
    {
        // Setup default validation rules.
        $this->defaultOptions['rules'] = $this->rules;

        // Setup default messages.
        $this->defaultOptions['messages'] = $this->messages;

        // Setup default placeholder.
        $this->defaultOptions['placeholder'] = $this->placeholder ?? $this->getBaseName();

        // Setup default label.
        $this->defaultOptions['label'] = $this->label ?? ucfirst(str_replace(['-', '_'], ' ', $this->getBaseName()));

        return $this->defaultOptions;
    }
public function getDefaultOptions ( ) : array { // Setup default validation rules. $ this -> defaultOptions [ 'rules' ] = $ this -> rules ; // Setup default messages. $ this -> defaultOptions [ 'messages' ] = $ this -> messages ; // Setup default placeholder. $ this -> defaultOptions [ 'placeholder' ] = $ this -> placeholder ?? $ this -> getBaseName ( ) ; // Setup default label. $ this -> defaultOptions [ 'label' ] = $ this -> label ?? ucfirst ( str_replace ( [ '-' , '_' ] , ' ' , $ this -> getBaseName ( ) ) ) ; return $ this -> defaultOptions ; }
Return the list of default options.

@return array
Return the list of default options .