protected function configureOptions(OptionsResolver $resolver)
    {
        $defined  = $this->schema->getDefinedOptions();
        $defaults = $this->schema->getDefaultOptions();
        $required = $this->schema->getRequiredOptions();

        if (! $defined && ! $defaults && ! $required) {
            return false;
        }

        try {
            if ($defined) {
                $resolver->setDefined($defined);
            }
            if ($defaults) {
                $resolver->setDefaults($defaults);
            }
            if ($required) {
                $resolver->setRequired($required);
            }
        } catch (Exception $exception) {
            throw new FailedToResolveConfigException(
                sprintf(
                    _('Error while processing config options: %1$s'),
                    $exception->getMessage()
                )
            );
        }

        return true;
    }
protected function configureOptions(OptionsResolver $resolver)
    {
        $defined  = $this->schema->getDefinedOptions();
        $defaults = $this->schema->getDefaultOptions();
        $required = $this->schema->getRequiredOptions();

        if (! $defined && ! $defaults && ! $required) {
            return false;
        }

        try {
            if ($defined) {
                $resolver->setDefined($defined);
            }
            if ($defaults) {
                $resolver->setDefaults($defaults);
            }
            if ($required) {
                $resolver->setRequired($required);
            }
        } catch (Exception $exception) {
            throw new FailedToResolveConfigException(
                sprintf(
                    _('Error while processing config options: %1$s'),
                    $exception->getMessage()
                )
            );
        }

        return true;
    }
protected function configureOptions ( OptionsResolver $ resolver ) { $ defined = $ this -> schema -> getDefinedOptions ( ) ; $ defaults = $ this -> schema -> getDefaultOptions ( ) ; $ required = $ this -> schema -> getRequiredOptions ( ) ; if ( ! $ defined && ! $ defaults && ! $ required ) { return false ; } try { if ( $ defined ) { $ resolver -> setDefined ( $ defined ) ; } if ( $ defaults ) { $ resolver -> setDefaults ( $ defaults ) ; } if ( $ required ) { $ resolver -> setRequired ( $ required ) ; } } catch ( Exception $ exception ) { throw new FailedToResolveConfigException ( sprintf ( _ ( 'Error while processing config options: %1$s' ) , $ exception -> getMessage ( ) ) ) ; } return true ; }
Configure the possible and required options for the Config.

This should return a bool to let the resolve_options() know whether the
actual resolving needs to be done or not.

@since 0.1.0

@param OptionsResolver $resolver Reference to the OptionsResolver
instance.

@return bool Whether to do the resolving.
@throws FailedToResolveConfigException If there are errors while processing.
Configure the possible and required options for the Config .