public function keyValues($form = null)
    {
        if (null === $this->configs) {
            $this->loadConfigs();
        }

        $keys = ($form) ? call_user_func([$form, 'getFields']) : [];

        $array = [];
        foreach ($this->configs as $key => $config) {
            if ($form && !in_array($key, $keys)) {
                continue;
            }

            $array[$key] = $config->getValue();
        }

        return $array;
    }
public function keyValues($form = null)
    {
        if (null === $this->configs) {
            $this->loadConfigs();
        }

        $keys = ($form) ? call_user_func([$form, 'getFields']) : [];

        $array = [];
        foreach ($this->configs as $key => $config) {
            if ($form && !in_array($key, $keys)) {
                continue;
            }

            $array[$key] = $config->getValue();
        }

        return $array;
    }
public function keyValues ( $ form = null ) { if ( null === $ this -> configs ) { $ this -> loadConfigs ( ) ; } $ keys = ( $ form ) ? call_user_func ( [ $ form , 'getFields' ] ) : [ ] ; $ array = [ ] ; foreach ( $ this -> configs as $ key => $ config ) { if ( $ form && ! in_array ( $ key , $ keys ) ) { continue ; } $ array [ $ key ] = $ config -> getValue ( ) ; } return $ array ; }
Returns a key-value array of the settings.

@param string $form

@return array
Returns a key - value array of the settings .