Merge the CSS/ID stuff.

@param Module $module
8315
private function mergeCssId(Module $module)
    {
        $cssID = StringUtil::deserialize($module->cssID, true);

        // Override the CSS ID (see #305)
        if ($this->cssID[0]) {
            $cssID[0] = $this->cssID[0];
        }

        // Merge the CSS classes (see #6011)
        if ($this->cssID[1]) {
            $cssID[1] = \trim($cssID[1].' '.$this->cssID[1]);
        }

        $module->cssID = $cssID;
    }
573507
protected function registerLanguageNamespace(Module $module)
    {
        $moduleName = $module->getName();

        $langPath = base_path("resources/lang/modules/$moduleName");

        if (is_dir($langPath)) {
            $this->loadTranslationsFrom($langPath, $moduleName);
            $this->app['localization.js-generator']->addSourcePath($langPath, $moduleName);
        } else {
            $this->loadTranslationsFrom($module->getPath().'/Resources/lang', $moduleName);
            $this->app['localization.js-generator']->addSourcePath($module->getPath().'/Resources/lang', $moduleName);
        }
    }
354833
public function updateModule()
	{
		$this->moduleHandle->cacheModuleConfig();	//oke
		$this->moduleHandle->setModules();	//oke
		$this->moduleHandle->updateModuleAddon();
	}
1294449
public function renderModule($module, $params = array(), $settings = array())
    {
        $style = null;

        if (is_object($module)) {
            $object = clone $module;
        } else {
            $object = new \stdClass();
        }
        if (!isset($object->published)) {
            $object->published = 1;
        }
        if (!is_object($module)) {
            $object->module = $module;
        }
        if (!isset($object->position)) {
            $object->position = '';
        }
        if (!isset($object->content)) {
            $object->content = '';
        }
        if (!isset($object->menuid)) {
            $object->menuid = '0';
        }
        if (!is_object($module)) {
            $object->name = preg_replace('/^mod_/', '', $module);
        }
        if (!isset($object->style)) {
            $object->style = null;
        }
        if (!isset($object->title)) {
            $object->title = '';
        }
        if (!isset($object->showtitle)) {
            $object->showtitle = '0';
        }

        if (isset($settings['title'])) {
            $object->title = $settings['title'];
            $object->showtitle = '1';
        }

        if (isset($settings['style'])) {
            $style = $object->style = $settings['style'];
        }

        if (isset($object->params)) {
            $params = array_merge(
                json_decode($object->params, true),
                $params
            );
        }

        $params = array_merge(array(
            'layout' => 'default',
            'moduleclass_sfx' => '',
            'cache' => 0,
            'cache_time' => 900,
            'cachemode' => 'itemid',
            'module_tag' => 'div',
            'bootstrap_size' => 0,
            'header_tag' => 'h2',
            'header_class' => '',
            'style' => '0'
        ), $params);

        $object->params = json_encode($params);

        $this->renderModuleObject($object, array(
            'style' => $style
        ));

        return $object->content;
    }
1177960
protected function setModuleEditor($module_id)
    {
        $this->data_module = $this->module->get($module_id);

        if (empty($this->data_module)) {
            $this->outputHttpStatus(404);
        }

        if ($this->data_module['type'] !== 'theme') {
            $this->outputHttpStatus(403);
        }
    }
46722
public function migrateModule($module)
    {
        $this->migrator->run(base_path() . '/modules/'.strtolower($module).'/database/migrations');

        $this->note($module);

        foreach ($this->migrator->getNotes() as $note) {
            $this->note(' - '.$note);
        }

        return $this;
    }
1202542
function merge(Style $style) {
    //treat the !important attribute
    //if old rule has !important attribute, override with new rule only if
    //the new rule is also !important
    foreach($style->_props as $prop => $val ) {
      if (isset($style->_important_props[$prop])) {
        $this->_important_props[$prop] = true;
        //see __set and __get, on all assignments clear cache!
        $this->_prop_cache[$prop] = null;
        $this->_props[$prop] = $val;
      } else if ( !isset($this->_important_props[$prop]) ) {
        //see __set and __get, on all assignments clear cache!
        $this->_prop_cache[$prop] = null;
        $this->_props[$prop] = $val;
      }
    }

    if ( isset($style->_props["font_size"]) )
      $this->__font_size_calculated = false;
  }
489901
public function run($module)
    {
        $moduleSettings = $module->getInfo('settings');
        $isTheme = $this->isTheme($module->getId());
        if (!$isTheme || ($isTheme && is_array($moduleSettings))) {
            $this->addModuleSettings($moduleSettings, $module->getId());
        }
    }
492632
private function autoloadFiles($module)
    {
        if (isset($module['autoload'])) {
            foreach ($module['autoload'] as $file) {
                $path = module_path($module['slug'], $file);

                if (file_exists($path)) {
                    include $path;
                }
            }
        }
    }
813111
private function validateConflict($module, $otherModule)
    {
        if ($module === $otherModule || !$module instanceof ConflictsWithModule) {
            return;
        }

        $conflicts = $this->normalizeConflictSpecification($module->_conflicts());
        if ($otherModule instanceof $conflicts) {
            throw new ModuleConflictException($module, $otherModule);
        }
    }
41444
protected function _addExtensions(\OxidEsales\Eshop\Core\Module\Module $module)
    {
        $aModulesDefault = $this->getConfig()->getConfigParam('aModules');
        $aModules = $this->getModulesWithExtendedClass();
        $aModules = $this->_removeNotUsedExtensions($aModules, $module);


        if ($module->hasExtendClass()) {
            $this->validateMetadataExtendSection($module);
            $aAddModules = $module->getExtensions();
            $aModules = $this->_mergeModuleArrays($aModules, $aAddModules);
        }

        $aModules = $this->buildModuleChains($aModules);
        if ($aModulesDefault != $aModules) {
            $this->needCacheClear = true;
            $onlyInAfterFix = array_diff($aModules, $aModulesDefault);
            $onlyInBeforeFix = array_diff($aModulesDefault, $aModules);
            $this->output->writeLn("[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->writeLn("[INFO] remove ext for $core");
                        $this->output->writeLn("[INFO] old: $oldChain");
                        $this->output->writeLn("[INFO] new: $ext");
                        //$this->_debugOutput->writeLn("[ERROR] extension chain is corrupted for this module");
                        //return;
                        continue;
                    } else {
                        $this->output->writeLn("[INFO] append $core => ...$newExt");
                    }
                    unset($onlyInBeforeFix[$core]);
                } else {
                    $this->output->writeLn("[INFO] add $core => $ext");
                }
            }
            foreach ($onlyInBeforeFix as $core => $ext) {
                $this->output->writeLn("[INFO] remove $core => $ext");
            }
            $this->_saveToConfig('aModules', $aModules);
        }
    }
398994
public function publishModule($module)
	{
		$this->amOnPage('administrator/index.php?option=com_modules');
		$this->searchForItem($module);
		$this->checkAllResults();
		$this->click(array('xpath' => "//div[@id='toolbar-publish']/button"));
		$this->waitForText(' published.', 30, array('id' => 'system-message-container'));
	}
112351
public void setOldModule() {

        m_oldModule = true;
        if (LOG.isDebugEnabled()) {
            LOG.debug(Messages.get().getBundle().key(Messages.LOG_OLD_MODULE_IMPORTED_0));
        }
    }
803253
public function setModulePosition($module, $position = 'position-7')
	{
		$this->amOnPage('administrator/index.php?option=com_modules');
		$this->searchForItem($module);
		$this->click(array('link' => $module));
		$this->waitForText("Modules: $module", 30, array('css' => 'h1.page-title'));
		$this->click(array('link' => 'Module'));
		$this->waitForElement(array('id' => 'general'), 30);
		$this->selectOptionInChosen('Position', $position);
		$this->click(array('xpath' => "//div[@id='toolbar-apply']/button"));
		$this->waitForText('Module saved', 30, array('id' => 'system-message-container'));
	}
1326740
public void addModule(Module module) {
        PreconditionUtil.verify(!initialized, "CrnkClient already initialized, cannot add further modules");
        if (module instanceof HttpAdapterAware) {
            ((HttpAdapterAware) module).setHttpAdapter(getHttpAdapter());
        }
        this.moduleRegistry.addModule(module);
    }
929082
def add_module(self, module):
        '''
        
        '''
        for key, value in module.__dict__.iteritems():
            if key[0:2] != '__':
                self.__setattr__(attr=key, value=value)
1098733
public static function addModules ($modules=array(), $load=false){
		if( static::$_modulesRegistered ){
			throw new Exception('Skin is attempting to add modules after modules have already been registered.');
		}
		if(empty($modules)){
			return;
		}
		static::$modules += (array) $modules;
		if($load){
			static::$autoloadModules += array_keys($modules);
		}
	}