public function select($fieldName, $options = [], array $attributes = [])
    {
        $attributes = optionsParser($attributes);

        if (!$attributes->exists('default') && !$attributes->exists('value')) {
            $attributes->Default->add('empty', true);
        }

        return parent::select($fieldName, $options, $attributes->toArray());
    }
public function select($fieldName, $options = [], array $attributes = [])
    {
        $attributes = optionsParser($attributes);

        if (!$attributes->exists('default') && !$attributes->exists('value')) {
            $attributes->Default->add('empty', true);
        }

        return parent::select($fieldName, $options, $attributes->toArray());
    }
public function select ( $ fieldName , $ options = [ ] , array $ attributes = [ ] ) { $ attributes = optionsParser ( $ attributes ) ; if ( ! $ attributes -> exists ( 'default' ) && ! $ attributes -> exists ( 'value' ) ) { $ attributes -> Default -> add ( 'empty' , true ) ; } return parent :: select ( $ fieldName , $ options , $ attributes -> toArray ( ) ) ; }
Returns a formatted SELECT element
@param string $fieldName Name attribute of the SELECT
@param array|\Traversable $options Array of the OPTION elements
(as 'value'=>'Text' pairs) to be used in the SELECT element
@param array $attributes The HTML attributes of the select element
@return string
Returns a formatted SELECT element