protected function _addExtensions(\OxidEsales\Eshop\Core\Module\Module $module)
    {
        $needFix = $this->checkExtensions($module, $aModulesDefault, $aModules);
        if ($needFix) {
            $this->needCacheClear = true;
            $onlyInAfterFix = array_diff($aModules, $aModulesDefault);
            $onlyInBeforeFix = array_diff($aModulesDefault, $aModules);
            $this->output->info("fixing " . $module->getId());
            foreach ($onlyInAfterFix as $core => $ext) {
                if ($oldChain = $onlyInBeforeFix[$core]) {
                    $newExt = substr($ext, strlen($oldChain));
                    if (!$newExt) {
                        //$newExt = substr($ext, strlen($oldChain));
                        $this->output->debug(" remove ext for $core");
                        $this->output->debug(" old: $oldChain");
                        $this->output->debug(" new: $ext");
                        //return;
                        continue;
                    } else {
                        $this->output->debug(" append $core => ...$newExt");
                    }
                    unset($onlyInBeforeFix[$core]);
                } else {
                    $this->output->debug(" add $core => $ext");
                }
            }
            foreach ($onlyInBeforeFix as $core => $ext) {
                $this->output->debug(" remove $core => $ext");
            }
            $this->_saveToConfig('aModules', $aModules);
        }
    }
protected function _addExtensions(\OxidEsales\Eshop\Core\Module\Module $module)
    {
        $needFix = $this->checkExtensions($module, $aModulesDefault, $aModules);
        if ($needFix) {
            $this->needCacheClear = true;
            $onlyInAfterFix = array_diff($aModules, $aModulesDefault);
            $onlyInBeforeFix = array_diff($aModulesDefault, $aModules);
            $this->output->info("fixing " . $module->getId());
            foreach ($onlyInAfterFix as $core => $ext) {
                if ($oldChain = $onlyInBeforeFix[$core]) {
                    $newExt = substr($ext, strlen($oldChain));
                    if (!$newExt) {
                        //$newExt = substr($ext, strlen($oldChain));
                        $this->output->debug(" remove ext for $core");
                        $this->output->debug(" old: $oldChain");
                        $this->output->debug(" new: $ext");
                        //return;
                        continue;
                    } else {
                        $this->output->debug(" append $core => ...$newExt");
                    }
                    unset($onlyInBeforeFix[$core]);
                } else {
                    $this->output->debug(" add $core => $ext");
                }
            }
            foreach ($onlyInBeforeFix as $core => $ext) {
                $this->output->debug(" remove $core => $ext");
            }
            $this->_saveToConfig('aModules', $aModules);
        }
    }
protected function _addExtensions ( \ OxidEsales \ Eshop \ Core \ Module \ Module $ module ) { $ needFix = $ this -> checkExtensions ( $ module , $ aModulesDefault , $ aModules ) ; if ( $ needFix ) { $ this -> needCacheClear = true ; $ onlyInAfterFix = array_diff ( $ aModules , $ aModulesDefault ) ; $ onlyInBeforeFix = array_diff ( $ aModulesDefault , $ aModules ) ; $ this -> output -> info ( "fixing " . $ module -> getId ( ) ) ; foreach ( $ onlyInAfterFix as $ core => $ ext ) { if ( $ oldChain = $ onlyInBeforeFix [ $ core ] ) { $ newExt = substr ( $ ext , strlen ( $ oldChain ) ) ; if ( ! $ newExt ) { //$newExt = substr($ext, strlen($oldChain)); $ this -> output -> debug ( " remove ext for $core" ) ; $ this -> output -> debug ( " old: $oldChain" ) ; $ this -> output -> debug ( " new: $ext" ) ; //return; continue ; } else { $ this -> output -> debug ( " append $core => ...$newExt" ) ; } unset ( $ onlyInBeforeFix [ $ core ] ) ; } else { $ this -> output -> debug ( " add $core => $ext" ) ; } } foreach ( $ onlyInBeforeFix as $ core => $ ext ) { $ this -> output -> debug ( " remove $core => $ext" ) ; } $ this -> _saveToConfig ( 'aModules' , $ aModules ) ; } }
Add extension to module

@param \OxidEsales\Eshop\Core\Module\Module $module
Add extension to module