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


PHP Vtiger_Util_Helper::getRecordName方法代码示例

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


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

示例1: if

<?php if ($_valid && !is_callable('content_56059ed690268')) {function content_56059ed690268($_smarty_tpl) {?>
<?php  $_smarty_tpl->tpl_vars['CONTACT_INFO'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['CONTACT_INFO']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['RELATED_CONTACTS']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['CONTACT_INFO']->key => $_smarty_tpl->tpl_vars['CONTACT_INFO']->value){
$_smarty_tpl->tpl_vars['CONTACT_INFO']->_loop = true;
?><a href='<?php echo $_smarty_tpl->tpl_vars['CONTACT_INFO']->value['_model']->getDetailViewUrl();?>
' title='<?php echo vtranslate("Contacts","Contacts");?>
'> <?php echo Vtiger_Util_Helper::getRecordName($_smarty_tpl->tpl_vars['CONTACT_INFO']->value['id']);?>
</a><br><?php } ?><?php }} ?>
开发者ID:jeremyevans6,项目名称:kulturedTiger-,代码行数:9,代码来源:025b4b1f51f7b68e43ccd12bf9accff037da5e79.file.MultireferenceDetailView.tpl.php

示例2: getInviteUserMailData

 public function getInviteUserMailData()
 {
     $adb = PearDatabase::getInstance();
     return [];
     // To do
     $return_id = $this->getId();
     $cont_qry = "select * from vtiger_cntactivityrel where activityid=?";
     $cont_res = $adb->pquery($cont_qry, array($return_id));
     $noofrows = $adb->num_rows($cont_res);
     $cont_id = array();
     if ($noofrows > 0) {
         for ($i = 0; $i < $noofrows; $i++) {
             $cont_id[] = $adb->query_result($cont_res, $i, "contactid");
         }
     }
     $cont_name = '';
     foreach ($cont_id as $key => $id) {
         if ($id != '') {
             $contact_name = Vtiger_Util_Helper::getRecordName($id);
             $cont_name .= $contact_name . ', ';
         }
     }
     $parentId = $this->get('parent_id');
     $parentName = '';
     if ($parentId != '') {
         $parentName = Vtiger_Util_Helper::getRecordName($parentId);
     }
     $cont_name = trim($cont_name, ', ');
     $mail_data = array();
     $mail_data['user_id'] = $this->get('assigned_user_id');
     $mail_data['subject'] = $this->get('subject');
     $moduleName = $this->getModuleName();
     $mail_data['status'] = $moduleName == 'Calendar' ? $this->get('taskstatus') : $this->get('eventstatus');
     $mail_data['activity_mode'] = $moduleName == 'Calendar' ? 'Task' : 'Events';
     $mail_data['taskpriority'] = $this->get('taskpriority');
     $mail_data['relatedto'] = $parentName;
     $mail_data['contact_name'] = $cont_name;
     $mail_data['description'] = $this->get('description');
     $mail_data['assign_type'] = $this->get('assigntype');
     $mail_data['group_name'] = getGroupName($this->get('assigned_user_id'));
     $mail_data['mode'] = $this->get('mode');
     //TODO : remove dependency on request;
     $value = getaddEventPopupTime($_REQUEST['time_start'], $_REQUEST['time_end'], '24');
     $start_hour = $value['starthour'] . ':' . $value['startmin'] . '' . $value['startfmt'];
     if ($_REQUEST['activity_mode'] != 'Task') {
         $end_hour = $value['endhour'] . ':' . $value['endmin'] . '' . $value['endfmt'];
     }
     $startDate = new DateTimeField($_REQUEST['date_start'] . " " . $start_hour);
     $endDate = new DateTimeField($_REQUEST['due_date'] . " " . $end_hour);
     $mail_data['st_date_time'] = $startDate->getDBInsertDateTimeValue();
     $mail_data['end_date_time'] = $endDate->getDBInsertDateTimeValue();
     $mail_data['location'] = $this->get('location');
     return $mail_data;
 }
开发者ID:rcrrich,项目名称:YetiForceCRM,代码行数:54,代码来源:Record.php

示例3: Events

 function Events($request, $moduleName)
 {
     $currentUser = Users_Record_Model::getCurrentUserModel();
     $viewer = $this->getViewer($request);
     $record = $request->get('record');
     if (!empty($record) && $request->get('isDuplicate') == true) {
         $recordModel = Vtiger_Record_Model::getInstanceById($record, $moduleName);
         $viewer->assign('MODE', '');
     } else {
         if (!empty($record)) {
             $recordModel = Vtiger_Record_Model::getInstanceById($record, $moduleName);
             $viewer->assign('MODE', 'edit');
             $viewer->assign('RECORD_ID', $record);
         } else {
             $recordModel = Vtiger_Record_Model::getCleanInstance($moduleName);
             $viewer->assign('MODE', '');
         }
     }
     $eventModule = Vtiger_Module_Model::getInstance($moduleName);
     $recordModel->setModuleFromInstance($eventModule);
     $moduleModel = $recordModel->getModule();
     $fieldList = $moduleModel->getFields();
     $requestFieldList = array_intersect_key($request->getAll(), $fieldList);
     foreach ($requestFieldList as $fieldName => $fieldValue) {
         $fieldModel = $fieldList[$fieldName];
         $specialField = false;
         // We collate date and time part together in the EditView UI handling
         // so a bit of special treatment is required if we come from QuickCreate
         if (empty($record) && ($fieldName == 'time_start' || $fieldName == 'time_end') && !empty($fieldValue)) {
             $specialField = true;
             // Convert the incoming user-picked time to GMT time
             // which will get re-translated based on user-time zone on EditForm
             $fieldValue = DateTimeField::convertToDBTimeZone($fieldValue)->format("H:i");
         }
         if (empty($record) && ($fieldName == 'date_start' || $fieldName == 'due_date') && !empty($fieldValue)) {
             if ($fieldName == 'date_start') {
                 $startTime = Vtiger_Time_UIType::getTimeValueWithSeconds($requestFieldList['time_start']);
                 $startDateTime = Vtiger_Datetime_UIType::getDBDateTimeValue($fieldValue . " " . $startTime);
                 list($startDate, $startTime) = explode(' ', $startDateTime);
                 $fieldValue = Vtiger_Date_UIType::getDisplayDateValue($startDate);
             } else {
                 $endTime = Vtiger_Time_UIType::getTimeValueWithSeconds($requestFieldList['time_end']);
                 $endDateTime = Vtiger_Datetime_UIType::getDBDateTimeValue($fieldValue . " " . $endTime);
                 list($endDate, $endTime) = explode(' ', $endDateTime);
                 $fieldValue = Vtiger_Date_UIType::getDisplayDateValue($endDate);
             }
         }
         if ($fieldModel->isEditable() || $specialField) {
             $recordModel->set($fieldName, $fieldModel->getDBInsertValue($fieldValue));
         }
     }
     $recordStructureInstance = Vtiger_RecordStructure_Model::getInstanceFromRecordModel($recordModel, Vtiger_RecordStructure_Model::RECORD_STRUCTURE_MODE_EDIT);
     $viewMode = $request->get('view_mode');
     if (!empty($viewMode)) {
         $viewer->assign('VIEW_MODE', $viewMode);
     }
     $userChangedEndDateTime = $request->get('userChangedEndDateTime');
     //If followup value is passed from request to process the value and sent to client
     $requestFollowUpDate = $request->get('followup_date_start');
     $requestFollowUpTime = $request->get('followup_time_start');
     $followUpStatus = $request->get('followup');
     $eventStatus = $request->get('eventstatus');
     if (!empty($requestFollowUpDate)) {
         $followUpDate = $requestFollowUpDate;
     }
     if (!empty($requestFollowUpTime)) {
         $followUpTime = $requestFollowUpTime;
     }
     if ($followUpStatus == 'on') {
         $viewer->assign('FOLLOW_UP_STATUS', TRUE);
     }
     if ($eventStatus == 'Held') {
         $viewer->assign('SHOW_FOLLOW_UP', TRUE);
     } else {
         $viewer->assign('SHOW_FOLLOW_UP', FALSE);
     }
     $viewer->assign('USER_CHANGED_END_DATE_TIME', $userChangedEndDateTime);
     $viewer->assign('FOLLOW_UP_DATE', $followUpDate);
     $viewer->assign('FOLLOW_UP_TIME', $followUpTime);
     $viewer->assign('RECURRING_INFORMATION', $recordModel->getRecurrenceInformation());
     $viewer->assign('TOMORROWDATE', Vtiger_Date_UIType::getDisplayDateValue(date('Y-m-d', time() + 86400)));
     $viewer->assign('RECORD_STRUCTURE_MODEL', $recordStructureInstance);
     $viewer->assign('RECORD_STRUCTURE', $recordStructureInstance->getStructure());
     $viewer->assign('MODULE', $moduleName);
     $viewer->assign('CURRENTDATE', date('Y-n-j'));
     $viewer->assign('USER_MODEL', Users_Record_Model::getCurrentUserModel());
     $existingRelatedContacts = $recordModel->getRelatedContactInfo();
     //To add contact ids that is there in the request . Happens in gotoFull form mode of quick create
     $requestContactIdValue = $request->get('contact_id');
     if (!empty($requestContactIdValue)) {
         $existingRelatedContacts[] = array('name' => Vtiger_Util_Helper::getRecordName($requestContactIdValue), 'id' => $requestContactIdValue);
     }
     $viewer->assign('RELATED_CONTACTS', $existingRelatedContacts);
     $isRelationOperation = $request->get('relationOperation');
     //if it is relation edit
     $viewer->assign('IS_RELATION_OPERATION', $isRelationOperation);
     if ($isRelationOperation) {
         $viewer->assign('SOURCE_MODULE', $request->get('sourceModule'));
         $viewer->assign('SOURCE_RECORD', $request->get('sourceRecord'));
     }
//.........这里部分代码省略.........
开发者ID:cannking,项目名称:vtigercrm-debug,代码行数:101,代码来源:Edit.php


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