public function ensureTypeIsSet(array &$options)
    {
        //if the 'type' option hasn't been set
        if (!isset($options['type'])) {
            //if this is a model and the field is equal to the primary key name, set it as a key field
            if ($this->config->getType() === 'model' && $options['field_name'] === $this->config->getDataModel()->getKeyName()) {
                $options['type'] = 'key';
            }
            //otherwise set it to the default 'text'
            else {
                $options['type'] = 'text';
            }
        }
    }
public function ensureTypeIsSet(array &$options)
    {
        //if the 'type' option hasn't been set
        if (!isset($options['type'])) {
            //if this is a model and the field is equal to the primary key name, set it as a key field
            if ($this->config->getType() === 'model' && $options['field_name'] === $this->config->getDataModel()->getKeyName()) {
                $options['type'] = 'key';
            }
            //otherwise set it to the default 'text'
            else {
                $options['type'] = 'text';
            }
        }
    }
public function ensureTypeIsSet ( array & $ options ) { //if the 'type' option hasn't been set if ( ! isset ( $ options [ 'type' ] ) ) { //if this is a model and the field is equal to the primary key name, set it as a key field if ( $ this -> config -> getType ( ) === 'model' && $ options [ 'field_name' ] === $ this -> config -> getDataModel ( ) -> getKeyName ( ) ) { $ options [ 'type' ] = 'key' ; } //otherwise set it to the default 'text' else { $ options [ 'type' ] = 'text' ; } } }
Ensures that the type option is set.

@param array $options
Ensures that the type option is set .