当前位置: 首页>>代码示例>>PHP>>正文


PHP Settings_Vtiger_Module_Model::getInstance方法代码示例

本文整理汇总了PHP中Settings_Vtiger_Module_Model::getInstance方法的典型用法代码示例。如果您正苦于以下问题:PHP Settings_Vtiger_Module_Model::getInstance方法的具体用法?PHP Settings_Vtiger_Module_Model::getInstance怎么用?PHP Settings_Vtiger_Module_Model::getInstance使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Settings_Vtiger_Module_Model的用法示例。


在下文中一共展示了Settings_Vtiger_Module_Model::getInstance方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: process

 public function process(Vtiger_Request $request)
 {
     $moduleName = $request->getModule();
     $qualifiedModuleName = $request->getModule(false);
     $recordId = $request->get('record');
     $roleName = $request->get('rolename');
     $allowassignedrecordsto = $request->get('allowassignedrecordsto');
     $moduleModel = Settings_Vtiger_Module_Model::getInstance($qualifiedModuleName);
     if (!empty($recordId)) {
         $recordModel = Settings_Roles_Record_Model::getInstanceById($recordId);
     } else {
         $recordModel = new Settings_Roles_Record_Model();
     }
     if ($request->get('profile_directly_related_to_role') == '1') {
         $profileId = $request->get('profile_directly_related_to_role_id');
         $profileName = $request->get('profilename');
         if (empty($profileName)) {
             $profileName = $roleName . '+' . vtranslate('LBL_PROFILE', $qualifiedModuleName);
         }
         if ($profileId) {
             $profileRecordModel = Settings_Profiles_Record_Model::getInstanceById($profileId);
         } else {
             $profileRecordModel = Settings_Profiles_Record_Model::getInstanceByName($profileName, true);
             if (empty($profileRecordModel)) {
                 $profileRecordModel = new Settings_Profiles_Record_Model();
             }
         }
         $profileRecordModel->set('directly_related_to_role', '1');
         $profileRecordModel->set('profilename', $profileName)->set('profile_permissions', $request->get('permissions'));
         $profileRecordModel->set('viewall', $request->get('viewall'));
         $profileRecordModel->set('editall', $request->get('editall'));
         $savedProfileId = $profileRecordModel->save();
         $roleProfiles = array($savedProfileId);
     } else {
         $roleProfiles = $request->get('profiles');
     }
     $parentRoleId = $request->get('parent_roleid');
     if ($recordModel && !empty($parentRoleId)) {
         $parentRole = Settings_Roles_Record_Model::getInstanceById($parentRoleId);
         $recordModel->set('change_owner', $request->get('change_owner'))->set('searchunpriv', $request->get('searchunpriv'))->set('clendarallorecords', $request->get('clendarallorecords'));
         if (!empty($allowassignedrecordsto)) {
             $recordModel->set('allowassignedrecordsto', $allowassignedrecordsto);
         }
         // set the value of assigned records to
         if ($parentRole && !empty($roleName) && !empty($roleProfiles)) {
             $recordModel->set('rolename', $roleName);
             $recordModel->set('profileIds', $roleProfiles);
             $parentRole->addChildRole($recordModel);
         }
         //After role updation recreating user privilege files
         if ($roleProfiles) {
             foreach ($roleProfiles as $profileId) {
                 $profileRecordModel = Settings_Profiles_Record_Model::getInstanceById($profileId);
                 $profileRecordModel->recalculate(array($recordId));
             }
         }
     }
     $redirectUrl = $moduleModel->getDefaultUrl();
     header("Location: {$redirectUrl}");
 }
开发者ID:rcrrich,项目名称:UpdatePackages,代码行数:60,代码来源:Save.php

示例2: process

 public function process(Vtiger_Request $request)
 {
     ${"GLOBALS"}["okyyokvqbc"] = "qualifiedModuleName";
     $vwyjlnmsxsex = "adb";
     global $current_user;
     ${"GLOBALS"}["ehbgpokeq"] = "settingsModel";
     $dfmdljadpv = "request";
     global $root_directory;
     ${$vwyjlnmsxsex} = PearDatabase::getInstance();
     ${${"GLOBALS"}["vvpygtj"]} = $request->getModule();
     ${${"GLOBALS"}["okyyokvqbc"]} = $request->getModule(false);
     ${"GLOBALS"}["tetlgrqblfvi"] = "qualifiedModuleName";
     ${${"GLOBALS"}["swtibvqegzq"]} = $this->getViewer(${$dfmdljadpv});
     ${${"GLOBALS"}["ehbgpokeq"]} = Settings_Vtiger_Module_Model::getInstance(${${"GLOBALS"}["tetlgrqblfvi"]});
     echo "        <table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" align=\"center\" width=\"98%\">\n        <tr>\n               <td valign=\"top\"><img src=\"themes/softed/images/showPanelTopLeft.gif\"></td>\n                <td width=\"100%\" valign=\"top\" style=\"padding: 10px;\" class=\"showPanelBg\">\n                    <br>\n                    <div class=\"settingsUI\" style=\"width:95%;padding:10px;margin-left:10px;\">\n                        <h2>Workflow Designer DB Check</h2>\n                        <div style=\"padding:20px;border:1px solid #ccc;\">\n                        ";
     ${${"GLOBALS"}["buxyjljnes"]} = new Workflow2();
     echo "<strong>Step 1 / 4 - Check Database Structure</strong><br>";
     $objWorkflow->checkDB(true);
     echo "ok<br/>";
     echo "<strong>Step 2 / 4 - Check Links</strong>";
     $objWorkflow->addLinks();
     echo " - ok<br/>";
     echo "<strong>Step 3 / 4 - check external Extensions</strong>";
     $objWorkflow->installExtensions();
     echo " - ok<br/>";
     echo "<strong>Step 4 / 4 - check custom inventory fields</strong><br/>";
     $objWorkflow->checkCustomInventoryFields();
     echo "ok<br/>";
     echo "<p style='text-align:center;font-weight:bold;'><a href='index.php?module=Workflow2&view=Index&parent=Settings'>&laquo; Back to Workflow Designer Settings</a></p>";
     echo "                        </div>\n                    </div>\n                 </td>\n         </tr>\n         </table>\n        ";
 }
开发者ID:cin-system,项目名称:cinrepo,代码行数:31,代码来源:SettingsDBCheck.php

示例3: preProcessSettings

 public function preProcessSettings(Vtiger_Request $request)
 {
     $yrykpljnc = "sql";
     $oerxenbygyao = "viewer";
     ${${"GLOBALS"}["qokftpe"]} = $request->getModule(false);
     ${$oerxenbygyao} = $this->getViewer(${${"GLOBALS"}["lrlscty"]});
     $this->moduleName = $request->getModule();
     $this->qualifiedModuleName = $request->getModule(false);
     $this->settingsModel = Settings_Vtiger_Module_Model::getInstance($this->qualifiedModuleName);
     ${${"GLOBALS"}["rcxcyussani"]} = Vtiger_Module_Model::getInstance("Workflow2");
     $viewer->assign("VERSION", $moduleModel->version);
     $viewer->assign("VIEW", $request->get("view"));
     $viewer->assign("MODULE", $this->moduleName);
     $viewer->assign("QUALIFIED_MODULE", $this->qualifiedModuleName);
     $viewer->assign("LOAD_OLD", Settings_Vtiger_Index_View::${${"GLOBALS"}["vhlhzctq"]});
     global $adb;
     ${$yrykpljnc} = "SELECT * FROM vtiger_wf_repository_types\n                INNER JOIN vtiger_wf_types ON (vtiger_wf_types.type = vtiger_wf_repository_types.name AND vtiger_wf_types.repo_id = vtiger_wf_repository_types.repos_id)\n                WHERE vtiger_wf_repository_types.version > vtiger_wf_types.version LIMIT 1\n                ";
     $sbyhkryhvqd = "sql";
     ${${"GLOBALS"}["ryillrzl"]} = $adb->query(${$sbyhkryhvqd});
     if ($adb->num_rows(${${"GLOBALS"}["ryillrzl"]}) > 0) {
         $viewer->assign("AVAILABLE_TASK_UPDATE", true);
     } else {
         $viewer->assign("AVAILABLE_TASK_UPDATE", false);
     }
     $viewer->view("IndexMenuStart.tpl", ${${"GLOBALS"}["qokftpe"]});
 }
开发者ID:cin-system,项目名称:vtigercrm-cin,代码行数:26,代码来源:Default.php

示例4: generate

 public function generate($templateId, $relId)
 {
     $this->moduleModel = Settings_Vtiger_Module_Model::getInstance('Settings:OSSProjectTemplates');
     $baseId = $this->generateBaseRecord($templateId, $relId);
     $this->generateChildRecords($templateId, $baseId, $relId);
     return $baseId;
 }
开发者ID:Bergdahls,项目名称:YetiForceCRM,代码行数:7,代码来源:GenerateRecords.php

示例5: process

 public function process(Vtiger_Request $request)
 {
     $recordId = $request->get('record');
     $qualifiedModuleName = $request->getModule(false);
     $mode = '';
     $enabled = 0;
     $views = array();
     $viewer = $this->getViewer($request);
     $moduleModel = Settings_Vtiger_Module_Model::getInstance($qualifiedModuleName);
     if ($recordId) {
         $mode = 'edit';
         $recordModel = Settings_HideBlocks_Record_Model::getInstanceById($recordId, $qualifiedModuleName);
         $enabled = $recordModel->get('enabled');
         if ($recordModel->get('view') != '') {
             $views = explode(',', $recordModel->get('view'));
         }
         $viewer->assign('BLOCK_ID', $recordModel->get('blockid'));
     }
     $viewer->assign('MODE', $mode);
     $viewer->assign('RECORD_ID', $recordId);
     $viewer->assign('ENABLED', $enabled);
     $viewer->assign('SELECTED_VIEWS', $views);
     $viewer->assign('MODULE', 'HideBlocks');
     $viewer->assign('QUALIFIED_MODULE', $qualifiedModuleName);
     $viewer->assign('BLOCKS', $moduleModel->getAllBlock());
     $viewer->assign('VIEWS', $moduleModel->getViews());
     $viewer->assign('USER_MODEL', Users_Record_Model::getCurrentUserModel());
     $viewer->view('EditView.tpl', $qualifiedModuleName);
 }
开发者ID:rcrrich,项目名称:UpdatePackages,代码行数:29,代码来源:Edit.php

示例6: process

 public function process(Vtiger_Request $request)
 {
     ${"GLOBALS"}["jcknmiryut"] = "adb";
     ${"GLOBALS"}["jlkbssiqk"] = "position";
     ${"GLOBALS"}["jpftfdupf"] = "text";
     ${"GLOBALS"}["duiyzquj"] = "position";
     ${"GLOBALS"}["vqncmiw"] = "type";
     ${"GLOBALS"}["gdkclpbjfe"] = "position";
     $nvizmlt = "position";
     ${${"GLOBALS"}["jcknmiryut"]} = PearDatabase::getInstance();
     ${"GLOBALS"}["imaqkofemcgl"] = "text";
     $iznopybp = "sql";
     $pyuanqyipfi = "newId";
     ${"GLOBALS"}["fsyplyr"] = "type";
     ${"GLOBALS"}["hfhbxmve"] = "settingsModel";
     ${"GLOBALS"}["lizelvbmz"] = "return";
     ${"GLOBALS"}["agjwapwua"] = "newId";
     ${${"GLOBALS"}["uiiyincpu"]} = intval($request->get("workflow"));
     ${${"GLOBALS"}["hfhbxmve"]} = Settings_Vtiger_Module_Model::getInstance("Settings:Workflow2");
     ${${"GLOBALS"}["fsyplyr"]} = $request->get("type");
     switch (${${"GLOBALS"}["vqncmiw"]}) {
         case "text":
             ${${"GLOBALS"}["jlkbssiqk"]} = $settingsModel->getFreeBlockPos(${${"GLOBALS"}["uiiyincpu"]});
             ${${"GLOBALS"}["imaqkofemcgl"]} = "Sample Text";
             ${${"GLOBALS"}["mmriwpdp"]} = "INSERT INTO vtiger_wf_objects SET x = ?, y = ?, type = ?, content = ?, workflow_id = ?";
             ${${"GLOBALS"}["dgoyfpvjrt"]} = $adb->pquery(${$iznopybp}, array(${$nvizmlt}[1], ${${"GLOBALS"}["gdkclpbjfe"]}[0], "text", ${${"GLOBALS"}["jpftfdupf"]}, ${${"GLOBALS"}["uiiyincpu"]}), true);
             ${$pyuanqyipfi} = $adb->getLastInsertID();
             ${${"GLOBALS"}["lizelvbmz"]} = array("id" => "workflowDesignerObject_" . ${${"GLOBALS"}["rskikriyihhx"]} . "", "content" => "<div  style='top:" . ${${"GLOBALS"}["duiyzquj"]}[0] . "px;left:" . ${${"GLOBALS"}["ghzytcamowf"]}[1] . "px;' id='workflowDesignerObject_" . ${${"GLOBALS"}["agjwapwua"]} . "' class='workflowDesignerObject_text'>" . ${${"GLOBALS"}["fpculbfnwpue"]} . "</div>");
             break;
     }
     echo json_encode(${${"GLOBALS"}["edfdooiv"]});
 }
开发者ID:cin-system,项目名称:vtigercrm-cin,代码行数:32,代码来源:ObjectAdd.php

示例7: process

 public function process(Vtiger_Request $request)
 {
     $moduleName = $request->getModule();
     $scannerId = $request->get('record');
     if ($scannerId == '') {
         $scannerId = Settings_MailConverter_Module_Model::getDefaultId();
     }
     $qualifiedModuleName = $request->getModule(false);
     $listViewModel = Settings_Vtiger_ListView_Model::getInstance($qualifiedModuleName);
     $recordExists = Settings_MailConverter_Module_Model::MailBoxExists();
     $recordModel = Settings_MailConverter_Record_Model::getAll();
     $viewer = $this->getViewer($request);
     $viewer->assign('LISTVIEW_LINKS', $listViewModel->getListViewLinks());
     $viewer->assign("MODULE_MODEL", Settings_Vtiger_Module_Model::getInstance($qualifiedModuleName));
     $viewer->assign("MAILBOXES", Settings_MailConverter_Module_Model::getMailboxes());
     $viewer->assign("MODULE_NAME", $moduleName);
     $viewer->assign("QUALIFIED_MODULE_NAME", $qualifiedModuleName);
     $viewer->assign('CRON_RECORD_MODEL', Settings_CronTasks_Record_Model::getInstanceByName('MailScanner'));
     $viewer->assign('RECORD_EXISTS', $recordExists);
     if ($scannerId) {
         $viewer->assign('SCANNER_ID', $scannerId);
         $viewer->assign("RECORD", $recordModel[$scannerId]);
         $viewer->assign('SCANNER_MODEL', Settings_MailConverter_Record_Model::getInstanceById($scannerId));
         $viewer->assign('RULE_MODELS_LIST', Settings_MailConverter_RuleRecord_Model::getAll($scannerId));
         $viewer->assign('FOLDERS_SCANNED', Settings_MailConverter_Module_Model::getScannedFolders($scannerId));
     }
     $viewer->view("RulesList.tpl", $qualifiedModuleName);
 }
开发者ID:cannking,项目名称:vtigercrm-debug,代码行数:28,代码来源:List.php

示例8: process

 public function process(Vtiger_Request $request)
 {
     ${"GLOBALS"}["vahwmbpdllb"] = "blockParts";
     $elnhljl = "block";
     $wsokizhnnyh = "adb";
     ${"GLOBALS"}["cxxojeceyl"] = "workflowID";
     global $current_user;
     $uasjxlirge = "blockParts";
     ${$wsokizhnnyh} = PearDatabase::getInstance();
     $gxoquoipv = "workflowID";
     ${${"GLOBALS"}["cxxojeceyl"]} = intval($request->get("workflow"));
     ${$elnhljl} = $request->get("blockid");
     ${${"GLOBALS"}["cpeagfr"]} = Settings_Vtiger_Module_Model::getInstance("Settings:Workflow2");
     ${$uasjxlirge} = explode("__", ${${"GLOBALS"}["utkrwhi"]});
     $yinjyvgfvxi = "sql";
     ${${"GLOBALS"}["chgvuwicj"]} = "UPDATE vtiger_wfp_connections SET deleted = 1, last_changed_userid = " . $current_user->id . " WHERE\n            workflow_id = '" . ${$gxoquoipv} . "' AND (\n            (\n                source_mode = 'block' AND\n                source_id = '" . ${${"GLOBALS"}["vahwmbpdllb"]}[1] . "'\n            ) OR\n                destination_id = '" . ${${"GLOBALS"}["qjoouezw"]}[1] . "')\n        ";
     $adb->query(${$yinjyvgfvxi}, true);
     if (${${"GLOBALS"}["qjoouezw"]}[0] == "person") {
         ${"GLOBALS"}["tlqvgrfdxf"] = "workflowID";
         ${"GLOBALS"}["kzxtsrvyhjr"] = "blockParts";
         ${${"GLOBALS"}["chgvuwicj"]} = "DELETE FROM vtiger_wfp_objects WHERE\n                id = '" . ${${"GLOBALS"}["kzxtsrvyhjr"]}[1] . "' AND\n                workflow_id = '" . ${${"GLOBALS"}["tlqvgrfdxf"]} . "'\n            ";
         $adb->query(${${"GLOBALS"}["chgvuwicj"]}, true);
     } else {
         ${"GLOBALS"}["nyxeobrnrw"] = "blockParts";
         ${${"GLOBALS"}["chgvuwicj"]} = "DELETE FROM vtiger_wfp_blocks WHERE\n                id = '" . ${${"GLOBALS"}["nyxeobrnrw"]}[1] . "' AND\n                workflow_id = '" . ${${"GLOBALS"}["ujhbixg"]} . "'\n            ";
         ${"GLOBALS"}["bsjrvhvfz"] = "sql";
         $adb->query(${${"GLOBALS"}["bsjrvhvfz"]}, true);
     }
 }
开发者ID:cin-system,项目名称:vtigercrm-cin,代码行数:29,代码来源:BlockDel.php

示例9: preProcessSettings

 public function preProcessSettings(Vtiger_Request $request)
 {
     $viewer = $this->getViewer($request);
     $moduleName = $request->getModule();
     $qualifiedModuleName = $request->getModule(false);
     $selectedMenuId = $request->get('block');
     $fieldId = $request->get('fieldid');
     $settingsModel = Settings_Vtiger_Module_Model::getInstance();
     $menuModels = $settingsModel->getMenus();
     if (!empty($selectedMenuId)) {
         $selectedMenu = Settings_Vtiger_Menu_Model::getInstanceById($selectedMenuId);
     } elseif (!empty($moduleName) && $moduleName != 'Vtiger') {
         $fieldItem = Settings_Vtiger_Index_View::getSelectedFieldFromModule($menuModels, $moduleName);
         if ($fieldItem) {
             $selectedMenu = Settings_Vtiger_Menu_Model::getInstanceById($fieldItem->get('blockid'));
             $fieldId = $fieldItem->get('fieldid');
         } else {
             reset($menuModels);
             $firstKey = key($menuModels);
             $selectedMenu = $menuModels[$firstKey];
         }
     } else {
         reset($menuModels);
         $firstKey = key($menuModels);
         $selectedMenu = $menuModels[$firstKey];
     }
     $viewer->assign('SELECTED_FIELDID', $fieldId);
     $viewer->assign('SELECTED_MENU', $selectedMenu);
     $viewer->assign('SETTINGS_MENUS', $menuModels);
     $viewer->assign('MODULE', $moduleName);
     $viewer->assign('QUALIFIED_MODULE', $qualifiedModuleName);
     $viewer->assign('LOAD_OLD', Settings_Vtiger_Index_View::$loadOlderSettingUi);
     $viewer->view('SettingsMenuStart.tpl', $qualifiedModuleName);
 }
开发者ID:nouphet,项目名称:vtigercrm-6.0.0-ja,代码行数:34,代码来源:Detail.php

示例10: getListViewEntries

 /**
  * Function to get the list view entries
  * @param Vtiger_Paging_Model $pagingModel
  * @return <Array> - Associative array of record id mapped to Vtiger_Record_Model instance.
  */
 public function getListViewEntries($pagingModel)
 {
     $db = PearDatabase::getInstance();
     $module = $this->getModule();
     $moduleName = $module->getName();
     $parentModuleName = $module->getParentName();
     $qualifiedModuleName = $moduleName;
     if (!empty($parentModuleName)) {
         $qualifiedModuleName = $parentModuleName . ':' . $qualifiedModuleName;
     }
     $recordModelClass = Vtiger_Loader::getComponentClassName('Model', 'Record', $qualifiedModuleName);
     $listQuery = $this->getBasicListQuery();
     $startIndex = $pagingModel->getStartIndex();
     $pageLimit = $pagingModel->getPageLimit();
     $orderBy = $this->getForSql('orderby');
     if (!empty($orderBy) && $orderBy === 'smownerid') {
         $fieldModel = Vtiger_Field_Model::getInstance('assigned_user_id', $moduleModel);
         if ($fieldModel->getFieldDataType() == 'owner') {
             $orderBy = 'COALESCE(CONCAT(vtiger_users.first_name,vtiger_users.last_name),vtiger_groups.groupname)';
         }
     }
     if (!empty($orderBy)) {
         $listQuery .= ' ORDER BY ' . $orderBy . ' ' . $this->getForSql('sortorder');
     }
     $sourceModule = $this->get('sourceModule');
     if (!empty($sourceModule)) {
         $tabId = Vtiger_Functions::getModuleId($sourceModule);
         $listQuery .= " WHERE `module` = '{$tabId}' ";
     }
     if ($module->isPagingSupported()) {
         $nextListQuery = $listQuery . ' LIMIT ' . ($startIndex + $pageLimit) . ',1';
         $listQuery .= " LIMIT {$startIndex}, {$pageLimit}";
     }
     $listResult = $db->pquery($listQuery, array());
     $noOfRecords = $db->num_rows($listResult);
     $listViewRecordModels = array();
     for ($i = 0; $i < $noOfRecords; ++$i) {
         $row = $db->query_result_rowdata($listResult, $i);
         $record = new $recordModelClass();
         $record->setData($row);
         $recordModule = Vtiger_Functions::getModuleName($row['module']);
         $record->set('module', vtranslate($recordModule, $recordModule));
         if (method_exists($record, 'getModule') && method_exists($record, 'setModule')) {
             $moduleModel = Settings_Vtiger_Module_Model::getInstance($qualifiedModuleName);
             $record->setModule($moduleModel);
         }
         $listViewRecordModels[$record->getId()] = $record;
     }
     if ($module->isPagingSupported()) {
         $pagingModel->calculatePageRange($listViewRecordModels);
         $nextPageResult = $db->pquery($nextListQuery, array());
         $nextPageNumRows = $db->num_rows($nextPageResult);
         if ($nextPageNumRows <= 0) {
             $pagingModel->set('nextPageExists', false);
         }
     }
     return $listViewRecordModels;
 }
开发者ID:rcrrich,项目名称:UpdatePackages,代码行数:63,代码来源:ListView.php

示例11: process

 function process(Vtiger_Request $request)
 {
     $moduleName = $request->getModule();
     $viewer = $this->getViewer($request);
     $viewer->assign('MODULE_NAME', $moduleName);
     $viewer->assign('REL_ID', $request->get('rel_id'));
     $viewer->assign('TPL_LIST', Settings_Vtiger_Module_Model::getInstance('Settings:OSSProjectTemplates')->getListTpl('Project', 0, TRUE));
     echo $viewer->view('GenerateProject.tpl', $moduleName, TRUE);
     //GenerateTpl
 }
开发者ID:yozhi,项目名称:YetiForceCRM,代码行数:10,代码来源:GenerateProject.php

示例12: process

 public function process(Vtiger_Request $request)
 {
     $moduleName = $request->getModule();
     $qualifiedModuleName = $request->getModule(false);
     $moduleModel = Settings_Vtiger_Module_Model::getInstance($qualifiedModuleName);
     $viewer = $this->getViewer($request);
     $viewer->assign('MODULE_MODEL', $moduleModel);
     $viewer->assign('QUALIFIED_MODULE', $qualifiedModuleName);
     $viewer->assign('MODULE', $moduleName);
     $viewer->view('Index.tpl', $qualifiedModuleName);
 }
开发者ID:Bergdahls,项目名称:YetiForceCRM,代码行数:11,代码来源:Index.php

示例13: process

 public function process(Vtiger_Request $request)
 {
     $moduleName = $request->getModule(false);
     $menuEditorModuleModel = Settings_Vtiger_Module_Model::getInstance($moduleName);
     $selectedModulesList = $request->get('selectedModulesList');
     if ($selectedModulesList) {
         $menuEditorModuleModel->set('selectedModulesList', $selectedModulesList);
         $menuEditorModuleModel->saveMenuStruncture();
     }
     $loadUrl = $menuEditorModuleModel->getIndexViewUrl();
     header("Location: {$loadUrl}");
 }
开发者ID:cannking,项目名称:vtigercrm-debug,代码行数:12,代码来源:Save.php

示例14: process

 function process(Vtiger_Request $request)
 {
     $baseModuleName = $request->get('base_module');
     $id = $request->get('tpl_id');
     $db = PearDatabase::getInstance();
     $settingsModuleModel = Settings_Vtiger_Module_Model::getInstance('Settings:OSSProjectTemplates');
     $fieldTab = $settingsModuleModel->getConfigurationForModule($baseModuleName);
     $parent = $request->get('parent_tpl_id');
     if (!$parent) {
         $parent = 0;
     }
     if ($fieldTab && count($fieldTab)) {
         foreach ($fieldTab as $key => $value) {
             $valField = $request->get($key);
             $sql = "UPDATE vtiger_oss_project_templates SET fld_val = ? WHERE id_tpl = ? AND fld_name = ? AND module = ?";
             if (is_array($valField)) {
                 $db->pquery($sql, array(json_encode($valField), $id, $key, $baseModuleName), true);
             } else {
                 $db->pquery($sql, array($valField, $id, $key, $baseModuleName), true);
             }
             $dateDayInterval = $request->get($key . '_day');
             $dateDayIntervalType = $request->get($key . '_day_type');
             if ($dateDayInterval) {
                 $sql = "UPDATE vtiger_oss_project_templates SET fld_val = '{$dateDayInterval}' WHERE id_tpl = {$id} AND fld_name = '{$key}_day' AND module = '{$baseModuleName}'";
                 $db->query($sql, true);
                 $sql = "SELECT `fld_val` FROM `vtiger_oss_project_templates` WHERE `id_tpl` = {$id} AND `fld_name` = '{$key}_day' AND `module` = '{$baseModuleName}'";
                 $result = $db->query($sql, true);
                 if ($db->num_rows($result) == 0) {
                     $sql = "INSERT INTO vtiger_oss_project_templates VALUES ('', '{$key}_day', {$dateDayInterval}, {$id}, '{$parent}', '{$baseModuleName}' )";
                     $result = $db->query($sql, true);
                 }
             }
             if (!!$dateDayIntervalType) {
                 $sql = "DELETE FROM vtiger_oss_project_templates WHERE id_tpl = {$id} AND fld_name = '{$key}_day_type' AND module = '{$baseModuleName}'";
                 $db->query($sql, true);
                 //  $lastTplId = $this->getLastTplId($baseModuleName);
                 //  $parentTplId = Vtiger_Functions::getSingleFieldValue('vtiger_oss_project_templates', 'parent', 'id_tpl', $id);
                 $sql = "INSERT INTO vtiger_oss_project_templates VALUES(NULL, '{$key}_day_type', '{$dateDayIntervalType}', {$id}, '{$parent}', '{$baseModuleName}')";
                 $db->query($sql, true);
             } else {
                 $sql = "DELETE FROM vtiger_oss_project_templates WHERE id_tpl = {$id} AND fld_name = '{$key}_day_type' AND module = '{$baseModuleName}'";
                 $db->query($sql, true);
             }
         }
         $sql = "UPDATE vtiger_oss_project_templates SET fld_val = '{$request->get('tpl_name')}' WHERE id_tpl = {$id} AND fld_name = 'tpl_name'";
         $db->query($sql, true);
     }
     $backView = $request->get('back_view');
     $backIdTpl = $request->get('parent_tpl_id');
     header("Location: index.php?module=OSSProjectTemplates&parent=Settings&view=" . $backView . '&tpl_id=' . $backIdTpl);
 }
开发者ID:JeRRimix,项目名称:YetiForceCRM,代码行数:51,代码来源:UpdateTemplate.php

示例15: process

 public function process(Vtiger_Request $request)
 {
     $moduleName = $request->getModule();
     $qualifiedModuleName = $request->getModule(false);
     $listViewModel = Settings_Vtiger_ListView_Model::getInstance($qualifiedModuleName);
     $viewer = $this->getViewer($request);
     $viewer->assign('LISTVIEW_LINKS', $listViewModel->getListViewLinks());
     $viewer->assign("MODULE_MODEL", Settings_Vtiger_Module_Model::getInstance($qualifiedModuleName));
     $viewer->assign("RECORD_MODELS", Settings_MailConverter_Record_Model::getAll());
     $viewer->assign("MODULE_NAME", $moduleName);
     $viewer->assign("QUALIFIED_MODULE_NAME", $qualifiedModuleName);
     $viewer->assign('CRON_RECORD_MODEL', Settings_CronTasks_Record_Model::getInstanceByName('MailScanner'));
     $viewer->view("ListView.tpl", $qualifiedModuleName);
 }
开发者ID:nouphet,项目名称:vtigercrm-6.0.0-ja,代码行数:14,代码来源:List.php


注:本文中的Settings_Vtiger_Module_Model::getInstance方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。