src/Service/Plugin/Registration.php
public static function deactivatePlugin($configClass)
    {
        if (static::$plugins[$configClass][static::IS_ACTIVE] !== true) {
            // We will not purge everything for a already deactivated plugin.
            return;
        }

        // Purge all settings in the underlying registration class.
        static::$logFolder = '';
        static::$chunkFolder = '';
        static::$configFile = '';
        static::$blacklistDebugMethods = array();
        static::$blacklistDebugClass = array();
        static::$additionalHelpFiles = array();
        static::$eventList = array();
        static::$rewriteList = array();
        static::$additionalSkinList = array();

        // Go through the remaining plugins.
        static::$plugins[$configClass][static::IS_ACTIVE] = false;
        foreach (static::$plugins as $pluginName => $plugin) {
            if ($plugin[static::IS_ACTIVE]) {
                call_user_func(array(static::$plugins[$pluginName][static::CONFIG_CLASS], 'exec'));
            }
        }

        // Renew the configuration class, so the new one will load all settings
        // from the registration class.
        if (isset(Krexx::$pool)) {
            Krexx::$pool->rewrite = static::$rewriteList;
            Krexx::$pool->eventService->register = static::$eventList;
            Krexx::$pool->config = Krexx::$pool->createClass('Brainworxx\\Krexx\\Service\\Config\\Config');
            Krexx::$pool->messages->readHelpTexts();
        }
    }
public static function deactivatePlugin($configClass)
    {
        if (static::$plugins[$configClass][static::IS_ACTIVE] !== true) {
            // We will not purge everything for a already deactivated plugin.
            return;
        }

        // Purge all settings in the underlying registration class.
        static::$logFolder = '';
        static::$chunkFolder = '';
        static::$configFile = '';
        static::$blacklistDebugMethods = array();
        static::$blacklistDebugClass = array();
        static::$additionalHelpFiles = array();
        static::$eventList = array();
        static::$rewriteList = array();
        static::$additionalSkinList = array();

        // Go through the remaining plugins.
        static::$plugins[$configClass][static::IS_ACTIVE] = false;
        foreach (static::$plugins as $pluginName => $plugin) {
            if ($plugin[static::IS_ACTIVE]) {
                call_user_func(array(static::$plugins[$pluginName][static::CONFIG_CLASS], 'exec'));
            }
        }

        // Renew the configuration class, so the new one will load all settings
        // from the registration class.
        if (isset(Krexx::$pool)) {
            Krexx::$pool->rewrite = static::$rewriteList;
            Krexx::$pool->eventService->register = static::$eventList;
            Krexx::$pool->config = Krexx::$pool->createClass('Brainworxx\\Krexx\\Service\\Config\\Config');
            Krexx::$pool->messages->readHelpTexts();
        }
    }
public static function deactivatePlugin ( $ configClass ) { if ( static :: $ plugins [ $ configClass ] [ static :: IS_ACTIVE ] !== true ) { // We will not purge everything for a already deactivated plugin. return ; } // Purge all settings in the underlying registration class. static :: $ logFolder = '' ; static :: $ chunkFolder = '' ; static :: $ configFile = '' ; static :: $ blacklistDebugMethods = array ( ) ; static :: $ blacklistDebugClass = array ( ) ; static :: $ additionalHelpFiles = array ( ) ; static :: $ eventList = array ( ) ; static :: $ rewriteList = array ( ) ; static :: $ additionalSkinList = array ( ) ; // Go through the remaining plugins. static :: $ plugins [ $ configClass ] [ static :: IS_ACTIVE ] = false ; foreach ( static :: $ plugins as $ pluginName => $ plugin ) { if ( $ plugin [ static :: IS_ACTIVE ] ) { call_user_func ( array ( static :: $ plugins [ $ pluginName ] [ static :: CONFIG_CLASS ] , 'exec' ) ) ; } } // Renew the configuration class, so the new one will load all settings // from the registration class. if ( isset ( Krexx :: $ pool ) ) { Krexx :: $ pool -> rewrite = static :: $ rewriteList ; Krexx :: $ pool -> eventService -> register = static :: $ eventList ; Krexx :: $ pool -> config = Krexx :: $ pool -> createClass ( 'Brainworxx\\Krexx\\Service\\Config\\Config' ) ; Krexx :: $ pool -> messages -> readHelpTexts ( ) ; } }
We deactivate the plugin and reset the configuration

@param string $configClass
The name of the plugin.
We deactivate the plugin and reset the configuration