public function loadSettingDefaults(array $fields, $user)
    {
        $user = $this->container->get('security.context')->getToken()->getUser();

        foreach($fields as $field){
            if (!$this->getSetting($field['setting_key'], $field['focus'], $user)) {
                if(!isset($field['default_value'])) {
                    $field['default_value'] = '';
                }
                $this->setSetting($field['setting_key'], $field['focus'], $field['default_value'], $field['context'], $user);
            }
        }

        //TODO: Increment schema_version setting
    }
public function loadSettingDefaults(array $fields, $user)
    {
        $user = $this->container->get('security.context')->getToken()->getUser();

        foreach($fields as $field){
            if (!$this->getSetting($field['setting_key'], $field['focus'], $user)) {
                if(!isset($field['default_value'])) {
                    $field['default_value'] = '';
                }
                $this->setSetting($field['setting_key'], $field['focus'], $field['default_value'], $field['context'], $user);
            }
        }

        //TODO: Increment schema_version setting
    }
public function loadSettingDefaults ( array $ fields , $ user ) { $ user = $ this -> container -> get ( 'security.context' ) -> getToken ( ) -> getUser ( ) ; foreach ( $ fields as $ field ) { if ( ! $ this -> getSetting ( $ field [ 'setting_key' ] , $ field [ 'focus' ] , $ user ) ) { if ( ! isset ( $ field [ 'default_value' ] ) ) { $ field [ 'default_value' ] = '' ; } $ this -> setSetting ( $ field [ 'setting_key' ] , $ field [ 'focus' ] , $ field [ 'default_value' ] , $ field [ 'context' ] , $ user ) ; } } //TODO: Increment schema_version setting }
Loading of settings needed for the app
Called if it's the first time or user need update of settings
Loading of settings needed for the app Called if it s the first time or user need update of settings