protected function resolveOptions($name, array $fieldOptions, array $builderOptions = array(), $optionsClass = null)
    {
        $getter = 'get'.ucfirst($name).'Options';

        if ($optionsClass) {
            if (method_exists($optionsClass, 'setAuthorizationChecker')) {
                $optionsClass->setAuthorizationChecker($this->authorizationChecker);
            }

            if (method_exists($optionsClass, $getter)) {
                // merge options from options class
                $fieldOptions = $optionsClass->$getter($fieldOptions, $builderOptions);
            }
        }

        if (method_exists($this, $getter)) {
            // merge options from form type class
            $fieldOptions = $this->$getter($fieldOptions, $builderOptions);
        }

        return $fieldOptions;
    }
protected function resolveOptions($name, array $fieldOptions, array $builderOptions = array(), $optionsClass = null)
    {
        $getter = 'get'.ucfirst($name).'Options';

        if ($optionsClass) {
            if (method_exists($optionsClass, 'setAuthorizationChecker')) {
                $optionsClass->setAuthorizationChecker($this->authorizationChecker);
            }

            if (method_exists($optionsClass, $getter)) {
                // merge options from options class
                $fieldOptions = $optionsClass->$getter($fieldOptions, $builderOptions);
            }
        }

        if (method_exists($this, $getter)) {
            // merge options from form type class
            $fieldOptions = $this->$getter($fieldOptions, $builderOptions);
        }

        return $fieldOptions;
    }
protected function resolveOptions ( $ name , array $ fieldOptions , array $ builderOptions = array ( ) , $ optionsClass = null ) { $ getter = 'get' . ucfirst ( $ name ) . 'Options' ; if ( $ optionsClass ) { if ( method_exists ( $ optionsClass , 'setAuthorizationChecker' ) ) { $ optionsClass -> setAuthorizationChecker ( $ this -> authorizationChecker ) ; } if ( method_exists ( $ optionsClass , $ getter ) ) { // merge options from options class $ fieldOptions = $ optionsClass -> $ getter ( $ fieldOptions , $ builderOptions ) ; } } if ( method_exists ( $ this , $ getter ) ) { // merge options from form type class $ fieldOptions = $ this -> $ getter ( $ fieldOptions , $ builderOptions ) ; } return $ fieldOptions ; }
Resolve field options.

@param  string       $name               Field name.
@param  array        $fieldOptions       Field options.
@param  array        $builderOptions     Form builder options.
@param  object|null  $optionsClass       The options class.
@return array                            Resolved field options.
Resolve field options .