public function actionSetConfig()
    {
       
        
        // The values accepted in the 'loaded', 'loadAtStartup' and 'ghost' columns of
        // the extensions table are 0 | 1.
        $configValue = $this->options['configValue'];
        $configParam = $this->options['configParameter'];
        $extensionId = $this->options['extension'];
        
        try{
            $ext = common_ext_ExtensionsManager::singleton()->getExtensionById($extensionId);
            $currentConfig = $ext->getConfiguration();
            
            if ($currentConfig == null){
                $this->error("The extension '${extensionId} is not referenced.", true);
            }
            else{
                // Change the configuration with the new value.
                switch ($configParam){
                    case 'loaded':
                        $currentConfig->loaded = $configValue;
                    break;
                    
                    case 'loadAtStartup':
                        $currentConfig->loadedAtStartUp = $configValue;
                    break;
                    
                    case 'ghost':
                        $currentConfig->ghost = $configValue;
                    break;
                    
                    default:
                        $this->error("Unknown configuration parameter '${configParam}'.", true);
                    break;
                }
            
                $currentConfig->save($ext);
                $this->outVerbose("Configuration parameter '${configParam}' successfully updated to " . (($configValue == true) ? 1 : 0) . " for extension '${extensionId}'.");
            }
        }
        catch (common_ext_ExtensionException $e){
            $this->error("The extension '${extensionId}' does not exist or has no manifest.", true);
        }
        
    }
public function actionSetConfig()
    {
       
        
        // The values accepted in the 'loaded', 'loadAtStartup' and 'ghost' columns of
        // the extensions table are 0 | 1.
        $configValue = $this->options['configValue'];
        $configParam = $this->options['configParameter'];
        $extensionId = $this->options['extension'];
        
        try{
            $ext = common_ext_ExtensionsManager::singleton()->getExtensionById($extensionId);
            $currentConfig = $ext->getConfiguration();
            
            if ($currentConfig == null){
                $this->error("The extension '${extensionId} is not referenced.", true);
            }
            else{
                // Change the configuration with the new value.
                switch ($configParam){
                    case 'loaded':
                        $currentConfig->loaded = $configValue;
                    break;
                    
                    case 'loadAtStartup':
                        $currentConfig->loadedAtStartUp = $configValue;
                    break;
                    
                    case 'ghost':
                        $currentConfig->ghost = $configValue;
                    break;
                    
                    default:
                        $this->error("Unknown configuration parameter '${configParam}'.", true);
                    break;
                }
            
                $currentConfig->save($ext);
                $this->outVerbose("Configuration parameter '${configParam}' successfully updated to " . (($configValue == true) ? 1 : 0) . " for extension '${extensionId}'.");
            }
        }
        catch (common_ext_ExtensionException $e){
            $this->error("The extension '${extensionId}' does not exist or has no manifest.", true);
        }
        
    }
public function actionSetConfig ( ) { // The values accepted in the 'loaded', 'loadAtStartup' and 'ghost' columns of // the extensions table are 0 | 1. $ configValue = $ this -> options [ 'configValue' ] ; $ configParam = $ this -> options [ 'configParameter' ] ; $ extensionId = $ this -> options [ 'extension' ] ; try { $ ext = common_ext_ExtensionsManager :: singleton ( ) -> getExtensionById ( $ extensionId ) ; $ currentConfig = $ ext -> getConfiguration ( ) ; if ( $ currentConfig == null ) { $ this -> error ( "The extension '${extensionId} is not referenced." , true ) ; } else { // Change the configuration with the new value. switch ( $ configParam ) { case 'loaded' : $ currentConfig -> loaded = $ configValue ; break ; case 'loadAtStartup' : $ currentConfig -> loadedAtStartUp = $ configValue ; break ; case 'ghost' : $ currentConfig -> ghost = $ configValue ; break ; default : $ this -> error ( "Unknown configuration parameter '${configParam}'." , true ) ; break ; } $ currentConfig -> save ( $ ext ) ; $ this -> outVerbose ( "Configuration parameter '${configParam}' successfully updated to " . ( ( $ configValue == true ) ? 1 : 0 ) . " for extension '${extensionId}'." ) ; } } catch ( common_ext_ExtensionException $ e ) { $ this -> error ( "The extension '${extensionId}' does not exist or has no manifest." , true ) ; } }
Sets a configuration parameter of an extension. The configuration
to change is provided with the 'configParameter' CLI argument and its
is provided with the 'configValue' CLI argument. The extension on which
want to change a parameter value is provided with the 'extension' CLI

Parameters that can be changed are:
- loaded (boolean)
- loadAtStartup (boolean)
- ghost (boolean)

@access public
@author Jerome Bogaerts, <jerome.bogaerts@tudor.lu>
@return void
Sets a configuration parameter of an extension . The configuration to change is provided with the configParameter CLI argument and its is provided with the configValue CLI argument . The extension on which want to change a parameter value is provided with the extension CLI