src/Core/Module/ModuleStateFixer.php
public function fix($module, $oConfig = null)
    {
        if ($oConfig !== null) {
            $this->setConfig($oConfig);
        }

        $moduleId = $module->getId();

        if (!$this->initialCacheClearDone) {
            //clearing some cache to be sure that fix runs not against a stale cache
            ModuleVariablesLocator::resetModuleVariables();
            if (extension_loaded('apc') && ini_get('apc.enabled')) {
                apc_clear_cache();
            }
            if ($this->output->getVerbosity() >= OutputInterface::VERBOSITY_VERBOSE) {
                $this->output->writeln("initial cache cleared");
            }
            $this->initialCacheClearDone = true;
        }
        $this->module = $module;
        $this->needCacheClear = false;
        $this->restoreModuleInformation($module, $moduleId);
        if ($this->needCacheClear){
            $this->resetModuleCache($module);
            $this->output->writeln("cache cleared for $moduleId");
        }
    }
public function fix($module, $oConfig = null)
    {
        if ($oConfig !== null) {
            $this->setConfig($oConfig);
        }

        $moduleId = $module->getId();

        if (!$this->initialCacheClearDone) {
            //clearing some cache to be sure that fix runs not against a stale cache
            ModuleVariablesLocator::resetModuleVariables();
            if (extension_loaded('apc') && ini_get('apc.enabled')) {
                apc_clear_cache();
            }
            if ($this->output->getVerbosity() >= OutputInterface::VERBOSITY_VERBOSE) {
                $this->output->writeln("initial cache cleared");
            }
            $this->initialCacheClearDone = true;
        }
        $this->module = $module;
        $this->needCacheClear = false;
        $this->restoreModuleInformation($module, $moduleId);
        if ($this->needCacheClear){
            $this->resetModuleCache($module);
            $this->output->writeln("cache cleared for $moduleId");
        }
    }
public function fix ( $ module , $ oConfig = null ) { if ( $ oConfig !== null ) { $ this -> setConfig ( $ oConfig ) ; } $ moduleId = $ module -> getId ( ) ; if ( ! $ this -> initialCacheClearDone ) { //clearing some cache to be sure that fix runs not against a stale cache ModuleVariablesLocator :: resetModuleVariables ( ) ; if ( extension_loaded ( 'apc' ) && ini_get ( 'apc.enabled' ) ) { apc_clear_cache ( ) ; } if ( $ this -> output -> getVerbosity ( ) >= OutputInterface :: VERBOSITY_VERBOSE ) { $ this -> output -> writeln ( "initial cache cleared" ) ; } $ this -> initialCacheClearDone = true ; } $ this -> module = $ module ; $ this -> needCacheClear = false ; $ this -> restoreModuleInformation ( $ module , $ moduleId ) ; if ( $ this -> needCacheClear ) { $ this -> resetModuleCache ( $ module ) ; $ this -> output -> writeln ( "cache cleared for $moduleId" ) ; } }
Fix module states task runs version, extend, files, templates, blocks,
settings and events information fix tasks

@param Module      $module
@param Config|null $oConfig If not passed uses default base shop config
Fix module states task runs version extend files templates blocks settings and events information fix tasks