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


PHP Vtiger_DetailView_Model::getInstance方法代码示例

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


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

示例1: getActivities

 /**
  * Function to get activities
  * @param Vtiger_Request $request
  * @return <List of activity models>
  */
 public function getActivities(Vtiger_Request $request)
 {
     $moduleName = 'Calendar';
     $moduleModel = Vtiger_Module_Model::getInstance($moduleName);
     $currentUserPriviligesModel = Users_Privileges_Model::getCurrentUserPrivilegesModel();
     if ($currentUserPriviligesModel->hasModulePermission($moduleModel->getId())) {
         $moduleName = $request->getModule();
         $recordId = $request->get('record');
         $pageNumber = $request->get('page');
         if (empty($pageNumber)) {
             $pageNumber = 1;
         }
         $pagingModel = new Vtiger_Paging_Model();
         $pagingModel->set('page', $pageNumber);
         $pagingModel->set('limit', 10);
         if (!$this->record) {
             $this->record = Vtiger_DetailView_Model::getInstance($moduleName, $recordId);
         }
         $recordModel = $this->record->getRecord();
         $moduleModel = $recordModel->getModule();
         $relatedActivities = $moduleModel->getCalendarActivities('', $pagingModel, 'all', $recordId);
         $viewer = $this->getViewer($request);
         $viewer->assign('RECORD', $recordModel);
         $viewer->assign('MODULE_NAME', $moduleName);
         $viewer->assign('PAGING_MODEL', $pagingModel);
         $viewer->assign('PAGE_NUMBER', $pageNumber);
         $viewer->assign('ACTIVITIES', $relatedActivities);
         return $viewer->view('RelatedActivities.tpl', $moduleName, true);
     }
 }
开发者ID:cannking,项目名称:vtigercrm-debug,代码行数:35,代码来源:Detail.php

示例2: preProcess

	public function preProcess(Vtiger_Request $request, $display=true) {
		if($this->checkPermission($request)) {
			$viewer = $this->getViewer($request);
			$currentUser = Users_Record_Model::getCurrentUserModel();
			$selectedModule = $request->getModule();
			$companyDetails = Vtiger_CompanyDetails_Model::getInstanceById();
			$companyLogo = $companyDetails->getLogo();
			$currentDate = Vtiger_Date_UIType::getDisplayDateValue(date('Y-n-j'));
			$viewer->assign('CURRENTDATE', $currentDate);
			$viewer->assign('MODULE', $selectedModule);
			$viewer->assign('MODULE_NAME', $selectedModule);
			$viewer->assign('QUALIFIED_MODULE', $selectedModule);
			$viewer->assign('PARENT_MODULE', $request->get('parent'));
			$viewer->assign('MENUS', Vtiger_Menu_Model::getAll(true));
			$viewer->assign('VIEW', $request->get('view'));
			$viewer->assign('COMPANY_LOGO',$companyLogo);
			$viewer->assign('USER_MODEL', $currentUser);
			
			$homeModuleModel = Vtiger_Module_Model::getInstance('Home');
			$viewer->assign('HOME_MODULE_MODEL', $homeModuleModel);
			$viewer->assign('HEADER_LINKS',$this->getHeaderLinks());
			$viewer->assign('ANNOUNCEMENT', $this->getAnnouncement());
			$viewer->assign('SEARCHABLE_MODULES', Vtiger_Module_Model::getSearchableModules());
			$viewer->assign('CHAT_ACTIVE', vtlib_isModuleActive('AJAXChat'));

			//Additional parameters
			$recordId = $request->get('record');
			$moduleName = $request->getModule();
			$detailViewModel = Vtiger_DetailView_Model::getInstance($moduleName, $recordId);
			$recordModel = $detailViewModel->getRecord();
			$detailViewLinkParams = array('MODULE'=>$moduleName,'RECORD'=>$recordId);
			$detailViewLinks = $detailViewModel->getDetailViewLinks($detailViewLinkParams);
			$viewer->assign('RECORD', $recordModel);
			$viewer->assign('MODULE_MODEL', $detailViewModel->getModule());
			$viewer->assign('DETAILVIEW_LINKS', $detailViewLinks);
			$viewer->assign('IS_EDITABLE', $detailViewModel->getRecord()->isEditable($moduleName));
			$viewer->assign('IS_DELETABLE', $detailViewModel->getRecord()->isDeletable($moduleName));

			$linkParams = array('MODULE'=>$moduleName, 'ACTION'=>$request->get('view'));
			$linkModels = $detailViewModel->getSideBarLinks($linkParams);
			$viewer->assign('QUICK_LINKS', $linkModels);
			$viewer->assign('PAGETITLE', $this->getPageTitle($request));
			$viewer->assign('FOOTER_SCRIPTS',$this->getFooterScripts($request));
			$viewer->assign('STYLES',$this->getHeaderCss($request));
			$viewer->assign('LANGUAGE_STRINGS', $this->getJSLanguageStrings($request));
			$viewer->assign('CURRENT_VIEW', $request->get('view'));
			$viewer->assign('SKIN_PATH', Vtiger_Theme::getCurrentUserThemePath());
			$viewer->assign('HTMLLANG', Vtiger_Language_Handler::getShortLanguageName());
			$viewer->assign('LANGUAGE', $currentUser->get('language'));
			$viewer->assign('HEADER_SCRIPTS',$this->getHeaderScripts($request));
			if($display) {
				$this->preProcessDisplay($request);
			}
		}
	}
开发者ID:rubichcube,项目名称:YetiForceCRM,代码行数:55,代码来源:PreferenceDetail.php

示例3: preProcess

 public function preProcess(Vtiger_Request $request, $display = true)
 {
     if ($this->checkPermission($request)) {
         $currentUser = Users_Record_Model::getCurrentUserModel();
         $recordId = $request->get('record');
         $moduleName = $request->getModule();
         $detailViewModel = Vtiger_DetailView_Model::getInstance($moduleName, $recordId);
         $recordModel = $detailViewModel->getRecord();
         $detailViewLinkParams = array('MODULE' => $moduleName, 'RECORD' => $recordId);
         $detailViewLinks = $detailViewModel->getDetailViewLinks($detailViewLinkParams);
         $viewer = $this->getViewer($request);
         $viewer->assign('RECORD', $recordModel);
         $viewer->assign('MODULE_MODEL', $detailViewModel->getModule());
         $viewer->assign('DETAILVIEW_LINKS', $detailViewLinks);
         $viewer->assign('IS_EDITABLE', $detailViewModel->getRecord()->isEditable($moduleName));
         $viewer->assign('IS_DELETABLE', $detailViewModel->getRecord()->isDeletable($moduleName));
         $linkParams = array('MODULE' => $moduleName, 'ACTION' => $request->get('view'));
         $linkModels = $detailViewModel->getSideBarLinks($linkParams);
         $viewer->assign('QUICK_LINKS', $linkModels);
         $viewer->assign('PAGETITLE', $this->getPageTitle($request));
         $viewer->assign('SCRIPTS', $this->getHeaderScripts($request));
         $viewer->assign('STYLES', $this->getHeaderCss($request));
         $viewer->assign('LANGUAGE_STRINGS', $this->getJSLanguageStrings($request));
         $viewer->assign('SEARCHABLE_MODULES', Vtiger_Module_Model::getSearchableModules());
         $menuModelsList = Vtiger_Menu_Model::getAll(true);
         $selectedModule = $request->getModule();
         $menuStructure = Vtiger_MenuStructure_Model::getInstanceFromMenuList($menuModelsList, $selectedModule);
         // Order by pre-defined automation process for QuickCreate.
         uksort($menuModelsList, array('Vtiger_MenuStructure_Model', 'sortMenuItemsByProcess'));
         $companyDetails = Vtiger_CompanyDetails_Model::getInstanceById();
         $companyLogo = $companyDetails->getLogo();
         $viewer->assign('CURRENTDATE', date('Y-n-j'));
         $viewer->assign('MODULE', $selectedModule);
         $viewer->assign('PARENT_MODULE', $request->get('parent'));
         $viewer->assign('VIEW', $request->get('view'));
         $viewer->assign('MENUS', $menuModelsList);
         $viewer->assign('MENU_STRUCTURE', $menuStructure);
         $viewer->assign('MENU_SELECTED_MODULENAME', $selectedModule);
         $viewer->assign('MENU_TOPITEMS_LIMIT', $menuStructure->getLimit());
         $viewer->assign('COMPANY_LOGO', $companyLogo);
         $viewer->assign('USER_MODEL', Users_Record_Model::getCurrentUserModel());
         $homeModuleModel = Vtiger_Module_Model::getInstance('Home');
         $viewer->assign('HOME_MODULE_MODEL', $homeModuleModel);
         $viewer->assign('HEADER_LINKS', $this->getHeaderLinks());
         $viewer->assign('ANNOUNCEMENT', $this->getAnnouncement());
         $viewer->assign('CURRENT_VIEW', $request->get('view'));
         $viewer->assign('SKIN_PATH', Vtiger_Theme::getCurrentUserThemePath());
         $viewer->assign('LANGUAGE', $currentUser->get('language'));
         if ($display) {
             $this->preProcessDisplay($request);
         }
     }
 }
开发者ID:cannking,项目名称:vtigercrm-debug,代码行数:53,代码来源:PreferenceDetail.php

示例4: getHelpbox

	public function getHelpbox(Vtiger_Request $request){
		
		$viewer = $this->getViewer($request);
		$wikiId = $request->get('id');
		$detailViewModel = Vtiger_DetailView_Model::getInstance($moduleName, $wikiId);
		$recordModel = $detailViewModel->getRecord();
		
		$viewer->assign('MODULE_NAME', $request->getModule());
		$viewer->assign('WIKI_ID', $wikiId);
		$viewer->assign('WIKI_RECORD', $recordModel);
		
		$viewer->view('Helpbox.tpl', $request->getModule());
	}
开发者ID:Wasage,项目名称:werpa,代码行数:13,代码来源:Frames.php

示例5: preProcess

 function preProcess(Vtiger_Request $request, $display = true)
 {
     $recordId = $request->get('record');
     $moduleName = $request->getModule();
     if (!$this->record) {
         $this->record = Vtiger_DetailView_Model::getInstance($moduleName, $recordId);
     }
     $recordModel = $this->record->getRecord();
     // To show recording link only if callstatus is 'completed'
     if ($recordModel->get('callstatus') != 'completed') {
         $recordModel->set('recordingurl', '');
     }
     return parent::preProcess($request, true);
 }
开发者ID:yozhi,项目名称:YetiForceCRM,代码行数:14,代码来源:Detail.php

示例6: process

 function process(Vtiger_Request $request)
 {
     $moduleName = $request->getModule();
     $id = $request->get('record');
     $recordModel = Vtiger_DetailView_Model::getInstance($moduleName, $id)->getRecord();
     $recordStrucure = Vtiger_RecordStructure_Model::getInstanceFromRecordModel($recordModel, Vtiger_RecordStructure_Model::RECORD_STRUCTURE_MODE_DETAIL);
     $structuredValues = $recordStrucure->getStructure();
     $viewer = $this->getViewer($request);
     $viewer->assign('MODULE_NAME', $moduleName);
     $viewer->assign('RECORD', $recordModel);
     $viewer->assign('RECORD_STRUCTURE', $structuredValues);
     $viewer->assign('RESTRICTS_ITEM', ['PLL_DISCARDED', 'PLL_ACCEPTED']);
     $this->preProcess($request);
     $viewer->view('Modal.tpl', $moduleName);
     $this->postProcess($request);
 }
开发者ID:Bergdahls,项目名称:YetiForceCRM,代码行数:16,代码来源:Modal.php

示例7: preProcess

 function preProcess(Vtiger_Request $request, $display = true)
 {
     $recordId = $request->get('record');
     $moduleName = $request->getModule();
     if (!$this->record) {
         $this->record = Vtiger_DetailView_Model::getInstance($moduleName, $recordId);
     }
     $recordModel = $this->record->getRecord();
     // To show recording link only if callstatus is 'completed'
     if ($recordModel->get('callstatus') != 'completed') {
         $recordModel->set('recordingurl', '');
     }
     // SalesPlatform.ru begin
     if ($recordModel->get('callstatus') == 'completed') {
         $recordModel->set('recordingurl', '<audio src="index.php?module=PBXManager&action=ListenRecord&record=' . $recordId . '" controls>
                 <a href="index.php?module=PBXManager&action=ListenRecord&record=' . $recordId . '" ><i class="icon-volume-up"></i></a>
             </audio>');
     }
     // SalesPlatform.ru end
     return parent::preProcess($request, true);
 }
开发者ID:DeliveryPLANET,项目名称:vTiger,代码行数:21,代码来源:Detail.php

示例8: process

 function process(Vtiger_Request $request)
 {
     $recordId = $request->get('record');
     $moduleName = $request->getModule();
     if (!$this->record) {
         $this->record = Vtiger_DetailView_Model::getInstance($moduleName, $recordId);
     }
     $recordModel = $this->record->getRecord();
     $recordStrucure = Vtiger_RecordStructure_Model::getInstanceFromRecordModel($recordModel, Vtiger_RecordStructure_Model::RECORD_STRUCTURE_MODE_DETAIL);
     $structuredValues = $recordStrucure->getStructure();
     $moduleModel = $recordModel->getModule();
     $viewer = $this->getViewer($request);
     $viewer->assign('VIEW', $request->get('view'));
     $viewer->assign('RECORD', $recordModel);
     $viewer->assign('RECORD_STRUCTURE', $structuredValues);
     $viewer->assign('BLOCK_LIST', $moduleModel->getBlocks());
     $viewer->assign('USER_MODEL', Users_Record_Model::getCurrentUserModel());
     $viewer->assign('MODULE_NAME', $moduleName);
     $viewer->assign('IS_AJAX_ENABLED', false);
     $viewer->view('SmartDetail.tpl', $moduleName);
 }
开发者ID:awflu,项目名称:YetiForceCRM,代码行数:21,代码来源:SmartDetail.php

示例9: getCalendarSettings

 public function getCalendarSettings(Vtiger_Request $request)
 {
     $viewer = $this->getViewer($request);
     $currentUserModel = Users_Record_Model::getCurrentUserModel();
     $module = $request->getModule();
     $detailViewModel = Vtiger_DetailView_Model::getInstance('Users', $currentUserModel->id);
     $userRecordStructure = Vtiger_RecordStructure_Model::getInstanceFromRecordModel($detailViewModel->getRecord(), Vtiger_RecordStructure_Model::RECORD_STRUCTURE_MODE_EDIT);
     $recordStructure = $userRecordStructure->getStructure();
     $allUsers = Users_Record_Model::getAll(true);
     $sharedUsers = Calendar_Module_Model::getCaledarSharedUsers($currentUserModel->id);
     $sharedType = Calendar_Module_Model::getSharedType($currentUserModel->id);
     $dayStartPicklistValues = Users_Record_Model::getDayStartsPicklistValues($recordStructure);
     $viewer->assign('CURRENTUSER_MODEL', $currentUserModel);
     $viewer->assign('SHAREDUSERS', $sharedUsers);
     $viewer->assign("DAY_STARTS", Zend_Json::encode($dayStartPicklistValues));
     $viewer->assign('ALL_USERS', $allUsers);
     $viewer->assign('RECORD_STRUCTURE', $recordStructure);
     $viewer->assign('MODULE', $module);
     $viewer->assign('RECORD', $currentUserModel->id);
     $viewer->assign('SHAREDTYPE', $sharedType);
     $viewer->view('CalendarSettings.tpl', $request->getModule());
 }
开发者ID:nouphet,项目名称:vtigercrm-6.0.0-ja,代码行数:22,代码来源:Calendar.php

示例10: process

 function process(Vtiger_Request $request)
 {
     $this->recordId = $request->get('relatedRecord');
     $this->moduleName = $request->get('relatedModule');
     $this->currentUserModel = Users_Record_Model::getCurrentUserModel();
     $this->moduleModel = Vtiger_Module_Model::getInstance($this->moduleName);
     if (!$this->record) {
         $this->record = Vtiger_DetailView_Model::getInstance($this->moduleName, $this->recordId);
     }
     $parentRecordModel = Vtiger_Record_Model::getInstanceById($this->recordId, $this->moduleName);
     $detailView = array();
     $detailView['detailViewLinks'] = $this->getDetailViewLinks($request);
     $detailView['nameFields'] = $this->moduleModel->getNameFields();
     $detailView['columnFields'] = $parentRecordModel->getDisplayableValues();
     $fields = $this->moduleModel->getFields();
     $fieldLabelList = array();
     foreach ($fields as $field) {
         $fieldLabelList[$field->getName()] = vtranslate($field->get('label'), $this->moduleName);
     }
     $detailView['fieldLabels'] = $fieldLabelList;
     $response = new Vtiger_Response();
     $response->setResult($detailView);
     $response->emit();
 }
开发者ID:googlicius,项目名称:SP,代码行数:24,代码来源:GetDetailView.php

示例11: showRelatedProductsServices

 function showRelatedProductsServices(Vtiger_Request $request)
 {
     $recordId = $request->get('record');
     $moduleName = $request->getModule();
     if (!$this->record) {
         $this->record = Vtiger_DetailView_Model::getInstance($moduleName, $recordId);
     }
     $recordModel = $this->record->getRecord();
     $detailViewLinkParams = array('MODULE' => $moduleName, 'RECORD' => $recordId);
     $detailViewLinks = $this->record->getDetailViewLinks($detailViewLinkParams);
     $viewer = $this->getViewer($request);
     $viewer->assign('RECORDID', $recordId);
     $viewer->assign('RECORD', $recordModel);
     //$viewer->assign('MODULE_SUMMARY', $this->showModuleSummaryView($request));
     $viewer->assign('DETAILVIEW_LINKS', $detailViewLinks);
     $viewer->assign('USER_MODEL', Users_Record_Model::getCurrentUserModel());
     $viewer->assign('IS_AJAX_ENABLED', $this->isAjaxEnabled($recordModel));
     $viewer->assign('MODULE_NAME', $moduleName);
     $viewer->assign('LIMIT', 5);
     $viewer->assign('PANDS', 'yes');
     $recordStrucure = Vtiger_RecordStructure_Model::getInstanceFromRecordModel($recordModel, Vtiger_RecordStructure_Model::RECORD_STRUCTURE_MODE_DETAIL);
     $structuredValues = $recordStrucure->getStructure();
     $moduleModel = $recordModel->getModule();
     $viewer->assign('RECORD_STRUCTURE', $structuredValues);
     $viewer->assign('BLOCK_LIST', $moduleModel->getBlocks());
     echo $viewer->view('DetailViewProductsServicesContents.tpl', $moduleName, true);
 }
开发者ID:krzychab,项目名称:YetiForceCRM,代码行数:27,代码来源:Detail.php

示例12: emailEdit

 function emailEdit($request)
 {
     $viewer = $this->getViewer($request);
     $this->emailActionsData($request);
     $recordId = $request->get('record');
     $moduleName = $request->getModule();
     $viewer = $this->getViewer($request);
     if (!$this->record) {
         $this->record = Vtiger_DetailView_Model::getInstance($moduleName, $recordId);
     }
     $recordModel = $this->record->getRecord();
     $TO = Zend_Json::decode(html_entity_decode($recordModel->get('saved_toid')));
     $CC = Zend_Json::decode(html_entity_decode($recordModel->get('ccmail')));
     $BCC = Zend_Json::decode(html_entity_decode($recordModel->get('bccmail')));
     $parentIds = explode('|', $recordModel->get('parent_id'));
     $toMailInfo = $toMailNamesList = array();
     foreach ($parentIds as $index => $parentFieldId) {
         if (empty($parentFieldId)) {
             continue;
         }
         $parentIdComponents = explode('@', $parentFieldId);
         $parentId = $parentIdComponents[0];
         if ($parentIdComponents[1] === '-1') {
             $parentRecordModel = Users_Record_Model::getInstanceById($parentId, 'Users');
         } else {
             $parentRecordModel = Vtiger_Record_Model::getInstanceById($parentId);
         }
         $emailFields = array_keys($parentRecordModel->getModule()->getFieldsByType('email'));
         foreach ($emailFields as $emailField) {
             $emailValue = $parentRecordModel->get($emailField);
             if (in_array($emailValue, $TO)) {
                 //expecting parent ids and to will be same order
                 $toMailInfo[$parentId][] = $emailValue;
                 //SalesPlatform.ru begin
                 $toMailNamesList[$parentId][] = array('label' => html_entity_decode($parentRecordModel->getName(), ENT_COMPAT | ENT_HTML401, 'UTF-8'), 'value' => $emailValue);
                 //$toMailNamesList[$parentId][] = array('label' => $parentRecordModel->getName(), 'value' => $emailValue);
                 //SalesPlatform.ru end
             }
         }
     }
     $viewer->assign('TO', $TO);
     $viewer->assign('TOMAIL_INFO', $toMailInfo);
     $viewer->assign('TOMAIL_NAMES_LIST', $toMailNamesList);
     $viewer->assign('CC', implode(',', $CC));
     $viewer->assign('BCC', implode(',', $BCC));
     $viewer->assign('RECORDID', $request->get('record'));
     $viewer->assign('RELATED_LOAD', true);
     $viewer->assign('EMAIL_MODE', 'edit');
     echo $viewer->view('ComposeEmailForm.tpl', $moduleName, true);
 }
开发者ID:zirf0,项目名称:openshift-salesplatform,代码行数:50,代码来源:ComposeEmail.php

示例13: showModuleDetailView

 /**
  * Function shows the entire detail for the record
  * @param Vtiger_Request $request
  * @return <type>
  */
 function showModuleDetailView(Vtiger_Request $request)
 {
     $recordId = $request->get('record');
     $moduleName = $request->getModule();
     if (!empty($recordId)) {
         $recordModel = Vtiger_Record_Model::getInstanceById($recordId);
         $activityType = $recordModel->getType();
         if ($activityType == 'Events') {
             $moduleName = 'Events';
         }
     }
     $detailViewModel = Vtiger_DetailView_Model::getInstance($moduleName, $recordId);
     $recordModel = $detailViewModel->getRecord();
     $recordStrucure = Vtiger_RecordStructure_Model::getInstanceFromRecordModel($recordModel, Vtiger_RecordStructure_Model::RECORD_STRUCTURE_MODE_DETAIL);
     $structuredValues = $recordStrucure->getStructure();
     $moduleModel = $recordModel->getModule();
     if ($moduleName == 'Events') {
         $relatedContacts = $recordModel->getRelatedContactInfo();
         foreach ($relatedContacts as $index => $contactInfo) {
             $contactRecordModel = Vtiger_Record_Model::getCleanInstance('Contacts');
             $contactRecordModel->setId($contactInfo['id']);
             $contactInfo['_model'] = $contactRecordModel;
             $relatedContacts[$index] = $contactInfo;
         }
     } else {
         $relatedContacts = array();
     }
     $viewer = $this->getViewer($request);
     $viewer->assign('RECORD', $recordModel);
     $viewer->assign('RECORD_STRUCTURE', $structuredValues);
     $viewer->assign('BLOCK_LIST', $moduleModel->getBlocks());
     $viewer->assign('RECORD_STRUCTURE_MODEL', $recordStrucure);
     $viewer->assign('USER_MODEL', Users_Record_Model::getCurrentUserModel());
     $viewer->assign('MODULE_NAME', $moduleName);
     $viewer->assign('RELATED_CONTACTS', $relatedContacts);
     $viewer->assign('IS_AJAX_ENABLED', $this->isAjaxEnabled($recordModel));
     $viewer->assign('RECURRING_INFORMATION', $recordModel->getRecurringDetails());
     if ($moduleName == 'Events') {
         $currentUser = Users_Record_Model::getCurrentUserModel();
         $accessibleUsers = $currentUser->getAccessibleUsers();
         $viewer->assign('ACCESSIBLE_USERS', $accessibleUsers);
         $viewer->assign('INVITIES_SELECTED', $recordModel->getInvities());
     }
     return $viewer->view('DetailViewFullContents.tpl', $moduleName, true);
 }
开发者ID:xrstf,项目名称:vtiger-mirror,代码行数:50,代码来源:Detail.php

示例14: postProcess

 public function postProcess(Vtiger_Request $request)
 {
     $recordId = $request->get('record');
     $moduleName = $request->getModule();
     if (!$this->record) {
         $this->record = Vtiger_DetailView_Model::getInstance($moduleName, $recordId);
     }
     $detailViewLinkParams = array('MODULE' => $moduleName, 'RECORD' => $recordId);
     $detailViewLinks = $this->record->getDetailViewLinks($detailViewLinkParams);
     $selectedTabLabel = $request->get('tab_label');
     if (empty($selectedTabLabel) && !empty($detailViewLinks['DETAILVIEWTAB']) && !empty($detailViewLinks['DETAILVIEWTAB'][0])) {
         $selectedTabLabel = $detailViewLinks['DETAILVIEWTAB'][0]->getLabel();
     }
     $viewer = $this->getViewer($request);
     $viewer->assign('SELECTED_TAB_LABEL', $selectedTabLabel);
     $viewer->assign('MODULE_MODEL', $this->record->getModule());
     $viewer->assign('DETAILVIEW_LINKS', $detailViewLinks);
     parent::postProcess($request);
 }
开发者ID:Bergdahls,项目名称:YetiForceCRM,代码行数:19,代码来源:Detail.php

示例15: emailEdit

 function emailEdit($request)
 {
     $viewer = $this->getViewer($request);
     $this->emailActionsData($request);
     $recordId = $request->get('record');
     $moduleName = $request->getModule();
     $viewer = $this->getViewer($request);
     if (!$this->record) {
         $this->record = Vtiger_DetailView_Model::getInstance($moduleName, $recordId);
     }
     $recordModel = $this->record->getRecord();
     $TO = Zend_Json::decode(html_entity_decode($recordModel->get('saved_toid')));
     $CC = Zend_Json::decode(html_entity_decode($recordModel->get('ccmail')));
     $BCC = Zend_Json::decode(html_entity_decode($recordModel->get('bccmail')));
     $parentIds = explode('|', $recordModel->get('parent_id'));
     $toMailInfo = array();
     foreach ($parentIds as $index => $parentFieldId) {
         if (empty($parentFieldId)) {
             continue;
         }
         $parentIdComponents = explode('@', $parentFieldId);
         $parentId = $parentIdComponents[0];
         //expecting parent ids and to will be same order
         $toMailInfo[$parentId][] = $TO[$index];
     }
     $viewer->assign('TO', $TO);
     $viewer->assign('TOMAIL_INFO', $toMailInfo);
     $viewer->assign('CC', implode(',', $CC));
     $viewer->assign('BCC', implode(',', $BCC));
     $viewer->assign('RECORDID', $request->get('record'));
     $viewer->assign('RELATED_LOAD', true);
     $viewer->assign('EMAIL_MODE', 'edit');
     echo $viewer->view('ComposeEmailForm.tpl', $moduleName, true);
 }
开发者ID:nouphet,项目名称:vtigercrm-6.0.0-ja,代码行数:34,代码来源:ComposeEmail.php


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