public function prepareOptions($name, $options, $loadRelationships = true)
    {
        //set the options array to the format we need
        $options = $this->validateOptions($name, $options);

        //make sure the 'title' option is set
        $options['title'] = isset($options['title']) ? $options['title'] : $options['field_name'];
        $options['hint'] = isset($options['hint']) ? $options['hint'] : '';

        //ensure the type is set and then check that the field type exists
        $this->ensureTypeIsSet($options);

        //set the proper relationship options
        $this->setRelationshipType($options, $loadRelationships);

        //check that the type is a valid field class
        $this->checkTypeExists($options);

        return $options;
    }
public function prepareOptions($name, $options, $loadRelationships = true)
    {
        //set the options array to the format we need
        $options = $this->validateOptions($name, $options);

        //make sure the 'title' option is set
        $options['title'] = isset($options['title']) ? $options['title'] : $options['field_name'];
        $options['hint'] = isset($options['hint']) ? $options['hint'] : '';

        //ensure the type is set and then check that the field type exists
        $this->ensureTypeIsSet($options);

        //set the proper relationship options
        $this->setRelationshipType($options, $loadRelationships);

        //check that the type is a valid field class
        $this->checkTypeExists($options);

        return $options;
    }
public function prepareOptions ( $ name , $ options , $ loadRelationships = true ) { //set the options array to the format we need $ options = $ this -> validateOptions ( $ name , $ options ) ; //make sure the 'title' option is set $ options [ 'title' ] = isset ( $ options [ 'title' ] ) ? $ options [ 'title' ] : $ options [ 'field_name' ] ; $ options [ 'hint' ] = isset ( $ options [ 'hint' ] ) ? $ options [ 'hint' ] : '' ; //ensure the type is set and then check that the field type exists $ this -> ensureTypeIsSet ( $ options ) ; //set the proper relationship options $ this -> setRelationshipType ( $ options , $ loadRelationships ) ; //check that the type is a valid field class $ this -> checkTypeExists ( $ options ) ; return $ options ; }
Sets up an options array with the required base values.

@param mixed $name
@param mixed $options
@param bool  $loadRelationships //determines whether or not to load the relationships

@return array
Sets up an options array with the required base values .