protected function initialize(array $config = [])
    {
        // Create a resolve and configure the defaults
        $resolver = new OptionsResolver();
        $this->configureDefaults($resolver);

        try
        {
            // Parse the config in avanzu_admin_theme.options as array object in avanzu_admin_context.options
            $newConfig = $resolver->resolve($config);
            // Change the internal storage array in the ArrayObject
            $this->exchangeArray($newConfig);
        }
        catch(UndefinedOptionsException $e)
        {
            echo $e->getMessage() . PHP_EOL;
            print_r($config, TRUE);
        }
    }
protected function initialize(array $config = [])
    {
        // Create a resolve and configure the defaults
        $resolver = new OptionsResolver();
        $this->configureDefaults($resolver);

        try
        {
            // Parse the config in avanzu_admin_theme.options as array object in avanzu_admin_context.options
            $newConfig = $resolver->resolve($config);
            // Change the internal storage array in the ArrayObject
            $this->exchangeArray($newConfig);
        }
        catch(UndefinedOptionsException $e)
        {
            echo $e->getMessage() . PHP_EOL;
            print_r($config, TRUE);
        }
    }
protected function initialize ( array $ config = [ ] ) { // Create a resolve and configure the defaults $ resolver = new OptionsResolver ( ) ; $ this -> configureDefaults ( $ resolver ) ; try { // Parse the config in avanzu_admin_theme.options as array object in avanzu_admin_context.options $ newConfig = $ resolver -> resolve ( $ config ) ; // Change the internal storage array in the ArrayObject $ this -> exchangeArray ( $ newConfig ) ; } catch ( UndefinedOptionsException $ e ) { echo $ e -> getMessage ( ) . PHP_EOL ; print_r ( $ config , TRUE ) ; } }
Create a OptionResolver with default parameters and overwrite the context
with the default options in avanzu_admin_theme.options

@param array $config The data under avanzu_admin_theme.options config
Create a OptionResolver with default parameters and overwrite the context with the default options in avanzu_admin_theme . options