public static function _appendToChain($aExtend) { // if the chain is still empty and "original" chain is needed if (self::$_blOriginal && !count(self::$_aChain)) { self::$_aChain = (array) modConfig::getInstance()->getConfigParam("aModules"); } // addping the "extend" chain to the main chain foreach ($aExtend as $sParent => $sExtends) { if (isset(self::$_aChain[$sParent])) { $sExtends = trim(self::$_aChain[$sParent], "& ") . "&" . trim($sExtends, "& "); } self::$_aChain[$sParent] = $sExtends; } }