當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Vtiger_Util_Helper::inVtiger6UI方法代碼示例

本文整理匯總了PHP中Vtiger_Util_Helper::inVtiger6UI方法的典型用法代碼示例。如果您正苦於以下問題:PHP Vtiger_Util_Helper::inVtiger6UI方法的具體用法?PHP Vtiger_Util_Helper::inVtiger6UI怎麽用?PHP Vtiger_Util_Helper::inVtiger6UI使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Vtiger_Util_Helper的用法示例。


在下文中一共展示了Vtiger_Util_Helper::inVtiger6UI方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: process

 /**
  * Process the request to perform relationship operations
  * @global Users Instance $current_user
  * @global PearDataBase Instance $adb
  * @global String $currentModule
  * @param MailManager_Request $request
  * @return boolean
  */
 function process(MailManager_Request $request)
 {
     global $current_user, $adb;
     $response = new MailManager_Response(true);
     $viewer = $this->getViewer();
     if ('find' == $request->getOperationArg()) {
         $this->skipConnection = true;
         // No need to connect to mailbox here, improves performance
         // Check if the message is already linked.
         $linkedto = MailManager_RelationControllerAction::associatedLink($request->get('_msguid'));
         // If the message was not linked, lookup for matching records, using FROM address
         if (empty($linkedto)) {
             $results = array();
             $modules = array();
             $allowedModules = $this->getCurrentUserMailManagerAllowedModules();
             foreach (self::$MODULES as $MODULE) {
                 if (!in_array($MODULE, $allowedModules)) {
                     continue;
                 }
                 $from = $request->get('_mfrom');
                 if (empty($from)) {
                     continue;
                 }
                 $results[$MODULE] = $this->lookupModuleRecordsWithEmail($MODULE, $from);
                 $describe = $this->ws_describe($MODULE);
                 $modules[$MODULE] = array('label' => $describe['label'], 'name' => textlength_check($describe['name']), 'id' => $describe['idPrefix']);
                 // If look is found in a module, skip rest. - for performance
                 //if (!empty($results[$MODULE])) break;
             }
             $viewer->assign('INVTIGER6UI', Vtiger_Util_Helper::inVtiger6UI());
             $viewer->assign('LOOKUPS', $results);
             $viewer->assign('MODULES', $modules);
         } else {
             $viewer->assign('LINKEDTO', $linkedto);
         }
         $viewer->assign('LinkToAvailableActions', $this->linkToAvailableActions());
         $viewer->assign('AllowedModules', $allowedModules);
         $viewer->assign('MSGNO', $request->get('_msgno'));
         $viewer->assign('FOLDER', $request->get('_folder'));
         $response->setResult(array('ui' => $viewer->fetch($this->getModuleTpl('Relationship.tpl'))));
     } else {
         if ('link' == $request->getOperationArg()) {
             $linkto = $request->get('_mlinkto');
             $foldername = $request->get('_folder');
             $connector = $this->getConnector($foldername);
             // This is to handle larger uploads
             $memory_limit = MailManager_Config::get('MEMORY_LIMIT');
             ini_set('memory_limit', $memory_limit);
             $mail = $connector->openMail($request->get('_msgno'));
             $mail->attachments();
             // Initialize attachments
             $linkedto = MailManager_RelationControllerAction::associate($mail, $linkto);
             $viewer->assign('LinkToAvailableActions', $this->linkToAvailableActions());
             $viewer->assign('AllowedModules', $this->getCurrentUserMailManagerAllowedModules());
             $viewer->assign('LINKEDTO', $linkedto);
             $viewer->assign('MSGNO', $request->get('_msgno'));
             $viewer->assign('FOLDER', $foldername);
             $response->setResult(array('ui' => $viewer->fetch($this->getModuleTpl('Relationship.tpl'))));
         } else {
             if ('create_wizard' == $request->getOperationArg()) {
                 global $currentModule;
                 $moduleName = $request->get('_mlinktotype');
                 $parent = $request->get('_mlinkto');
                 $foldername = $request->get('_folder');
                 $connector = $this->getConnector($foldername);
                 $mail = $connector->openMail($request->get('_msgno'));
                 $qcreate_array = QuickCreate($moduleName);
                 $validationData = $qcreate_array['data'];
                 $data = split_validationdataArray($validationData);
                 $qcreate_array['form'] = $this->processFormData($qcreate_array['form'], $mail);
                 $viewer->assign("QUICKCREATE", $qcreate_array['form']);
                 if ($moduleName == 'Calendar') {
                     $viewer->assign("QCMODULE", getTranslatedString('Todo', 'Calendar'));
                 } elseif ($moduleName == "HelpDesk") {
                     $viewer->assign("QCMODULE", getTranslatedString('Ticket', 'HelpDesk'));
                 } else {
                     $viewer->assign("QCMODULE", getTranslatedString("SINGLE_" . $moduleName, $moduleName));
                 }
                 $viewer->assign("PARENT", $parent);
                 $viewer->assign("MODULE", $moduleName);
                 $viewer->assign('MSGNO', $request->get('_msgno'));
                 $viewer->assign('FOLDER', $foldername);
                 $viewer->assign("VALIDATION_DATA_FIELDNAME", $data['fieldname']);
                 $viewer->assign("VALIDATION_DATA_FIELDDATATYPE", $data['datatype']);
                 $viewer->assign("VALIDATION_DATA_FIELDLABEL", $data['fieldlabel']);
                 $viewer->display($this->getModuleTpl('RelationshipCreateWizard.tpl'));
                 $response = false;
             } else {
                 if ('create' == $request->getOperationArg()) {
                     $linkModule = $request->get('_mlinktotype');
                     $parent = $request->get('_mlinkto');
                     $focus = CRMEntity::getInstance($linkModule);
//.........這裏部分代碼省略.........
開發者ID:nouphet,項目名稱:vtigercrm-6.0.0-ja,代碼行數:101,代碼來源:RelationController.php


注:本文中的Vtiger_Util_Helper::inVtiger6UI方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。