function getPriModuleFieldsList($module, $modtype, $mode = '') { global $log; $log->debug("Entering getPriModuleFieldsList method moduleID=" . $module); $cachedInfo = VTCacheUtils::lookupMap_ListofModuleInfos(); if ($cachedInfo !== false) { $this->module_list = $cachedInfo['module_list']; $this->rel_fields = $cachedInfo['rel_fields']; } $modName = getTabModuleName($module); $this->primodule = $module; // if($mode == "edit") // foreach($this->module_list[$modName] as $key=>$value) // { // $ret_module_list[$modName][$value] = $this->getFieldListbyBlock($modName,$key,'direct'); // } // else $temp = array(); foreach ($this->module_list->{$modName} as $key => $value) { $temp = $this->getFieldListbyBlock($modName, $key, 'direct'); if ($temp !== NULL) { $ret_module_list[$modName][$value] = $temp; } } // var_dump($ret_module_list); if ($modtype == "target") { $this->related_modules = $cachedInfo['related_modules']; $this->rel_fields = $cachedInfo['rel_fields']; if ($mode == "edit") { $arr = $this->related_modules[$modName]; } else { $arr = $this->related_modules->{$modName}; } for ($i = 0; $i < count($arr); $i++) { $modName = $arr[$i]; if ($mode == "edit") { foreach ($this->module_list[$modName] as $key => $value) { $ret_module_list[$modName][$value] = $this->getFieldListbyBlock($modName, $key, 'related'); } } else { foreach ($this->module_list->{$modName} as $key => $value) { $ret_module_list[$modName][$value] = $this->getFieldListbyBlock($modName, $key, 'related'); } } } } $this->pri_module_columnslist = $ret_module_list; $log->debug("Exiting getPriModuleFieldsList method"); return true; }