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


PHP getEntityName函数代码示例

本文整理汇总了PHP中getEntityName函数的典型用法代码示例。如果您正苦于以下问题:PHP getEntityName函数的具体用法?PHP getEntityName怎么用?PHP getEntityName使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: getDisplayName

	function getDisplayName() {
		if (!isset($this->_entityName)) {
			$entityName = getEntityName($this->module, array($this->crmid));
			$this->_entityName = $entityName[$this->crmid];
		}
		return $this->_entityName;
	}
开发者ID:nvh3010,项目名称:quancrm,代码行数:7,代码来源:ModTracker_Basic.php

示例2: pdfmakerGetEntityName

 function pdfmakerGetEntityName($entityid)
 {
     $adb = PearDatabase::getInstance();
     $row = $adb->fetchByAssoc($adb->pquery("SELECT setype FROM vtiger_crmentity WHERE crmid=?", array($entityid)));
     $return = getEntityName($row['setype'], array($entityid));
     return $return[$entityid];
 }
开发者ID:cin-system,项目名称:cinrepo,代码行数:7,代码来源:entityName.php

示例3: getEditValue

 /**
  * Getting value to display
  * @param type $value
  * @return string
  */
 public function getEditValue($value)
 {
     $referenceModule = $this->getReferenceModule($value);
     if ($referenceModule) {
         $entityNames = getEntityName($referenceModule, [$value]);
         return $entityNames[$value];
     }
     return '';
 }
开发者ID:HoererUndFlamme,项目名称:YetiForceCRM,代码行数:14,代码来源:Reference.php

示例4: getEditViewDisplayValue

 /**
  * Function to get the display value in edit view
  * @param reference record id
  * @return link
  */
 public function getEditViewDisplayValue($value)
 {
     $referenceModule = $this->getReferenceModule($value);
     if ($referenceModule) {
         $referenceModuleName = $referenceModule->get('name');
         $entityNames = getEntityName($referenceModuleName, array($value));
         return $entityNames[$value];
     }
     return '';
 }
开发者ID:rcrrich,项目名称:YetiForceCRM,代码行数:15,代码来源:Reference.php

示例5: handleEvent

 function handleEvent($eventName, $data)
 {
     global $adb;
     if ($eventName == 'vtiger.entity.aftersave') {
         $labelInfo = getEntityName($data->getModuleName(), $data->getId(), true);
         if ($labelInfo) {
             $label = decode_html($labelInfo[$data->getId()]);
             $adb->pquery('UPDATE vtiger_crmentity SET label=? WHERE crmid=?', array($label, $data->getId()));
         }
     }
 }
开发者ID:cannking,项目名称:vtigercrm-debug,代码行数:11,代码来源:RecordLabelUpdater.php

示例6: getEditViewDisplayValue

 /**
  * Function to get the display value in edit view
  * @param reference record id
  * @return link
  */
 public function getEditViewDisplayValue($value)
 {
     global $log;
     $log->debug("Entering ./uitypes/Reference.php::getEditViewDisplayValue");
     $referenceModule = $this->getReferenceModule($value);
     if ($referenceModule) {
         $referenceModuleName = $referenceModule->get('name');
         $entityNames = getEntityName($referenceModuleName, array($value));
         return $entityNames[$value];
     }
     return '';
 }
开发者ID:cin-system,项目名称:cinrepo,代码行数:17,代码来源:Reference.php

示例7: handleEvent

 function handleEvent($eventName, $data)
 {
     global $log;
     $log->debug("Entering ./handlers/RecordLabelUpdater.php::handleEvent");
     global $adb;
     if ($eventName == 'vtiger.entity.aftersave') {
         $module = $data->getModuleName();
         if ($module != "Users") {
             $labelInfo = getEntityName($module, $data->getId());
             if ($labelInfo) {
                 $label = decode_html($labelInfo[$data->getId()]);
                 $adb->pquery('UPDATE vtiger_crmentity SET label=? WHERE crmid=?', array($label, $data->getId()));
             }
         }
     }
 }
开发者ID:cin-system,项目名称:cinrepo,代码行数:16,代码来源:RecordLabelUpdater.php

示例8: searchIncomingCalls

 public function searchIncomingCalls(Vtiger_Request $request)
 {
     $recordModel = PBXManager_Record_Model::getCleanInstance();
     $response = new Vtiger_Response();
     $user = Users_Record_Model::getCurrentUserModel();
     $recordModels = $recordModel->searchIncomingCall();
     // To check whether user have permission on caller record
     if ($recordModels) {
         foreach ($recordModels as $recordModel) {
             // To check whether the user has permission to see contact name in popup
             $recordModel->set('callername', null);
             $callerid = $recordModel->get('customer');
             if ($callerid) {
                 $moduleName = $recordModel->get('customertype');
                 if (!Users_Privileges_Model::isPermitted($moduleName, 'DetailView', $callerid)) {
                     $name = $recordModel->get('customernumber') . vtranslate('LBL_HIDDEN', 'PBXManager');
                     $recordModel->set('callername', $name);
                 } else {
                     $entityNames = getEntityName($moduleName, array($callerid));
                     $callerName = $entityNames[$callerid];
                     $recordModel->set('callername', $callerName);
                 }
             }
             // End
             $direction = $recordModel->get('direction');
             if ($direction == 'inbound') {
                 $userid = $recordModel->get('user');
                 if ($userid) {
                     $entityNames = getEntityName('Users', array($userid));
                     $userName = $entityNames[$userid];
                     $recordModel->set('answeredby', $userName);
                 }
             }
             $recordModel->set('current_user_id', $user->id);
             $calls[] = $recordModel->getData();
         }
     }
     $response->setResult($calls);
     $response->emit();
 }
开发者ID:Bergdahls,项目名称:YetiForceCRM,代码行数:40,代码来源:IncomingCallPoll.php

示例9: startCall

function startCall()
{
    global $current_user, $adb, $log;
    require_once 'include/utils/utils.php';
    require_once 'modules/PBXManager/utils/AsteriskClass.php';
    require_once 'modules/PBXManager/AsteriskUtils.php';
    $id = $current_user->id;
    $number = $_REQUEST['number'];
    $record = $_REQUEST['recordid'];
    $result = $adb->query("select * from vtiger_asteriskextensions where userid=" . $current_user->id);
    $extension = $adb->query_result($result, 0, "asterisk_extension");
    $data = getAsteriskInfo($adb);
    if (!empty($data)) {
        $server = $data['server'];
        $port = $data['port'];
        $username = $data['username'];
        $password = $data['password'];
        $version = $data['version'];
        $errno = $errstr = NULL;
        $sock = fsockopen($server, $port, $errno, $errstr, 1);
        stream_set_blocking($sock, false);
        if ($sock === false) {
            echo "Socket cannot be created due to error: {$errno}:  {$errstr}\n";
            $log->debug("Socket cannot be created due to error:   {$errno}:  {$errstr}\n");
            exit(0);
        }
        $asterisk = new Asterisk($sock, $server, $port);
        loginUser($username, $password, $asterisk);
        $asterisk->transfer($extension, $number);
        $callerModule = getSalesEntityType($record);
        $entityNames = getEntityName($callerModule, array($record));
        $callerName = $entityNames[$record];
        $callerInfo = array('id' => $record, 'module' => $callerModule, 'name' => $callerName);
        //adds to pbx manager
        addToCallHistory($extension, $extension, $number, "outgoing", $adb, $callerInfo);
        // add to the records activity history
        addOutgoingcallHistory($current_user, $extension, $record, $adb);
    }
}
开发者ID:casati-dolibarr,项目名称:corebos,代码行数:39,代码来源:StartCall.php

示例10: elseif

} elseif (isset($_REQUEST['leadval']) && $_REQUEST['leadval'] != '') {
    foreach ($storearray as $id) {
        if (isPermitted($return_module, 'EditView', $id) == 'yes') {
            if ($id != '') {
                $sql = "update vtiger_leaddetails set leadstatus=? where leadid=?";
                $result = $adb->pquery($sql, array($leadstatusval, $id));
                $query = "update vtiger_crmentity set modifiedby=?, modifiedtime=? where crmid=?";
                $result1 = $adb->pquery($query, array($current_user->id, $adb->formatDate($date_var, true), $id));
            }
        } else {
            $ids_list[] = $id;
        }
    }
}
if (count($ids_list) > 0) {
    $ret_owner = getEntityName($return_module, $ids_list);
    $errormsg = implode(',', $ret_owner);
} else {
    $errormsg = '';
}
if ($return_action == 'ActivityAjax') {
    $view = vtlib_purify($_REQUEST['view']);
    $day = vtlib_purify($_REQUEST['day']);
    $month = vtlib_purify($_REQUEST['month']);
    $year = vtlib_purify($_REQUEST['year']);
    $type = vtlib_purify($_REQUEST['type']);
    $viewOption = vtlib_purify($_REQUEST['viewOption']);
    $subtab = vtlib_purify($_REQUEST['subtab']);
    header("Location: index.php?module={$return_module}&action=" . $return_action . "&type=" . $type . $rstart . "&view=" . $view . "&day=" . $day . "&month=" . $month . "&year=" . $year . "&viewOption=" . $viewOption . "&subtab=" . $subtab . $url);
} else {
    header("Location: index.php?module={$return_module}&action=" . $return_module . "Ajax&file=ListView&ajax=changestate" . $rstart . "&viewname=" . $viewid . "&errormsg=" . $errormsg . $url);
开发者ID:hardikk,项目名称:HNH,代码行数:31,代码来源:updateLeadDBStatus.php

示例11: getPDFMakerFieldValue

 public function getPDFMakerFieldValue($report, $picklistArray, $dbField, $valueArray, $fieldName)
 {
     global $current_user, $default_charset;
     $db = PearDatabase::getInstance();
     $value = $valueArray[$fieldName];
     $fld_type = $dbField->type;
     list($module, $fieldLabel) = explode('_', $dbField->name, 2);
     $fieldInfo = $this->getFieldByPDFMakerLabel($module, $fieldLabel);
     $fieldType = null;
     $fieldvalue = $value;
     if (!empty($fieldInfo)) {
         $field = WebserviceField::fromArray($db, $fieldInfo);
         $fieldType = $field->getFieldDataType();
     }
     if ($fieldType == 'currency' && $value != '') {
         // Some of the currency fields like Unit Price, Total, Sub-total etc of Inventory modules, do not need currency conversion
         if ($field->getUIType() == '72') {
             $curid_value = explode("::", $value);
             $currency_id = $curid_value[0];
             $currency_value = $curid_value[1];
             $cur_sym_rate = getCurrencySymbolandCRate($currency_id);
             if ($value != '') {
                 if ($dbField->name == 'Products_Unit_Price') {
                     // need to do this only for Products Unit Price
                     if ($currency_id != 1) {
                         $currency_value = (double) $cur_sym_rate['rate'] * (double) $currency_value;
                     }
                 }
                 $formattedCurrencyValue = CurrencyField::convertToUserFormat($currency_value, null, true);
                 $fieldvalue = CurrencyField::appendCurrencySymbol($formattedCurrencyValue, $cur_sym_rate['symbol']);
             }
         } else {
             $currencyField = new CurrencyField($value);
             $fieldvalue = $currencyField->getDisplayValue();
         }
     } elseif ($dbField->name == "PurchaseOrder_Currency" || $dbField->name == "SalesOrder_Currency" || $dbField->name == "Invoice_Currency" || $dbField->name == "Quotes_Currency" || $dbField->name == "PriceBooks_Currency") {
         if ($value != '') {
             $fieldvalue = getTranslatedCurrencyString($value);
         }
     } elseif (in_array($dbField->name, $this->ui101_fields) && !empty($value)) {
         $entityNames = getEntityName('Users', $value);
         $fieldvalue = $entityNames[$value];
     } elseif ($fieldType == 'date' && !empty($value)) {
         if ($module == 'Calendar' && $field->getFieldName() == 'due_date') {
             $endTime = $valueArray['calendar_end_time'];
             if (empty($endTime)) {
                 $recordId = $valueArray['calendar_id'];
                 $endTime = getSingleFieldValue('vtiger_activity', 'time_end', 'activityid', $recordId);
             }
             $date = new DateTimeField($value . ' ' . $endTime);
             $fieldvalue = $date->getDisplayDate();
         } else {
             $fieldvalue = DateTimeField::convertToUserFormat($value);
         }
     } elseif ($fieldType == "datetime" && !empty($value)) {
         $date = new DateTimeField($value);
         $fieldvalue = $date->getDisplayDateTimeValue();
     } elseif ($fieldType == 'time' && !empty($value) && $field->getFieldName() != 'duration_hours') {
         if ($field->getFieldName() == "time_start" || $field->getFieldName() == "time_end") {
             $date = new DateTimeField($value);
             $fieldvalue = $date->getDisplayTime();
         } else {
             $fieldvalue = $value;
         }
     } elseif ($fieldType == "picklist" && !empty($value)) {
         if (is_array($picklistArray)) {
             if (is_array($picklistArray[$dbField->name]) && $field->getFieldName() != 'activitytype' && !in_array($value, $picklistArray[$dbField->name])) {
                 $fieldvalue = $app_strings['LBL_NOT_ACCESSIBLE'];
             } else {
                 $fieldvalue = $this->getTranslatedString($value, $module);
             }
         } else {
             $fieldvalue = $this->getTranslatedString($value, $module);
         }
     } elseif ($fieldType == "multipicklist" && !empty($value)) {
         if (is_array($picklistArray[1])) {
             $valueList = explode(' |##| ', $value);
             $translatedValueList = array();
             foreach ($valueList as $value) {
                 if (is_array($picklistArray[1][$dbField->name]) && !in_array($value, $picklistArray[1][$dbField->name])) {
                     $translatedValueList[] = $app_strings['LBL_NOT_ACCESSIBLE'];
                 } else {
                     $translatedValueList[] = $this->getTranslatedString($value, $module);
                 }
             }
         }
         if (!is_array($picklistArray[1]) || !is_array($picklistArray[1][$dbField->name])) {
             $fieldvalue = str_replace(' |##| ', ', ', $value);
         } else {
             implode(', ', $translatedValueList);
         }
     } elseif ($fieldType == 'double') {
         if ($current_user->truncate_trailing_zeros == true) {
             $fieldvalue = decimalFormat($fieldvalue);
         }
     }
     if ($fieldvalue == "") {
         return "-";
     }
     $fieldvalue = str_replace("<", "&lt;", $fieldvalue);
//.........这里部分代码省略.........
开发者ID:cin-system,项目名称:cinrepo,代码行数:101,代码来源:RelBlockRun.php

示例12: getRecordInfoFromID

/**
 * this function accepts an ID and returns the entity value for that id
 * @param integer $id - the crmid of the record
 * @return string $data - the entity name for the id
 */
function getRecordInfoFromID($id)
{
    global $adb;
    $data = array();
    $sql = "select setype from vtiger_crmentity where crmid=?";
    $result = $adb->pquery($sql, array($id));
    if ($adb->num_rows($result) > 0) {
        $setype = $adb->query_result($result, 0, "setype");
        $data = getEntityName($setype, $id);
    }
    $data = array_values($data);
    $data = $data[0];
    return $data;
}
开发者ID:vtiger-jp,项目名称:vtigercrm-5.1.x-ja,代码行数:19,代码来源:utils.php

示例13: fetchNameList

 public function fetchNameList($field, $result)
 {
     $referenceFieldInfoList = $this->queryGenerator->getReferenceFieldInfoList();
     $fieldName = $field->getFieldName();
     $rowCount = $this->db->num_rows($result);
     $idList = array();
     for ($i = 0; $i < $rowCount; $i++) {
         $id = $this->db->query_result($result, $i, $field->getColumnName());
         if (!isset($this->nameList[$fieldName][$id])) {
             $idList[$id] = $id;
         }
     }
     $idList = array_keys($idList);
     if (count($idList) == 0) {
         return;
     }
     $moduleList = $referenceFieldInfoList[$fieldName];
     foreach ($moduleList as $module) {
         $meta = $this->queryGenerator->getMeta($module);
         if ($meta->isModuleEntity()) {
             if ($module == 'Users') {
                 $nameList = getOwnerNameList($idList);
             } else {
                 //TODO handle multiple module names overriding each other.
                 $nameList = getEntityName($module, $idList);
             }
         } else {
             $nameList = vtws_getActorEntityName($module, $idList);
         }
         $entityTypeList = array_intersect(array_keys($nameList), $idList);
         foreach ($entityTypeList as $id) {
             $this->typeList[$id] = $module;
         }
         if (empty($this->nameList[$fieldName])) {
             $this->nameList[$fieldName] = array();
         }
         foreach ($entityTypeList as $id) {
             $this->typeList[$id] = $module;
             $this->nameList[$fieldName][$id] = $nameList[$id];
         }
     }
 }
开发者ID:Bergdahls,项目名称:YetiForceCRM,代码行数:42,代码来源:ListViewController.php

示例14: getValue

function getValue($field_result, $list_result, $fieldname, $focus, $module, $entity_id, $list_result_count, $mode, $popuptype, $returnset = '', $viewid = '')
{
    global $log, $listview_max_textlength, $app_strings, $current_language, $currentModule;
    $log->debug("Entering getValue(" . $field_result . "," . $list_result . "," . $fieldname . "," . get_class($focus) . "," . $module . "," . $entity_id . "," . $list_result_count . "," . $mode . "," . $popuptype . "," . $returnset . "," . $viewid . ") method ...");
    global $adb, $current_user, $default_charset;
    require 'user_privileges/user_privileges_' . $current_user->id . '.php';
    $tabname = getParentTab();
    $tabid = getTabid($module);
    $current_module_strings = return_module_language($current_language, $module);
    $uicolarr = $field_result[$fieldname];
    foreach ($uicolarr as $key => $value) {
        $uitype = $key;
        $colname = $value;
    }
    //added for getting event status in Custom view - Jaguar
    if ($module == 'Calendar' && ($colname == "status" || $colname == "eventstatus")) {
        $colname = "activitystatus";
    }
    //Ends
    $field_val = $adb->query_result($list_result, $list_result_count, $colname);
    if (stristr(html_entity_decode($field_val), "<a href") === false && $uitype != 8) {
        $temp_val = textlength_check($field_val);
    } elseif ($uitype != 8) {
        $temp_val = html_entity_decode($field_val, ENT_QUOTES);
    } else {
        $temp_val = $field_val;
    }
    // vtlib customization: New uitype to handle relation between modules
    if ($uitype == '10') {
        $parent_id = $field_val;
        if (!empty($parent_id)) {
            $parent_module = getSalesEntityType($parent_id);
            $valueTitle = $parent_module;
            if ($app_strings[$valueTitle]) {
                $valueTitle = $app_strings[$valueTitle];
            }
            $displayValueArray = getEntityName($parent_module, $parent_id);
            if (!empty($displayValueArray)) {
                foreach ($displayValueArray as $key => $value) {
                    $displayValue = $value;
                }
            }
            $value = "<a href='index.php?module={$parent_module}&action=DetailView&record={$parent_id}' title='{$valueTitle}'>{$displayValue}</a>";
        } else {
            $value = '';
        }
    } else {
        if ($uitype == 53) {
            $value = textlength_check($adb->query_result($list_result, $list_result_count, 'user_name'));
            // When Assigned To field is used in Popup window
            if ($value == '') {
                $user_id = $adb->query_result($list_result, $list_result_count, 'smownerid');
                if ($user_id != null && $user_id != '') {
                    $value = getOwnerName($user_id);
                }
            }
        } elseif ($uitype == 52) {
            $value = getUserName($adb->query_result($list_result, $list_result_count, $colname));
        } elseif ($uitype == 51) {
            $parentid = $adb->query_result($list_result, $list_result_count, "parentid");
            if ($module == 'Accounts') {
                $entity_name = textlength_check(getAccountName($parentid));
            } elseif ($module == 'Products') {
                $entity_name = textlength_check(getProductName($parentid));
            }
            $value = '<a href="index.php?module=' . $module . '&action=DetailView&record=' . $parentid . '&parenttab=' . $tabname . '" style="' . $P_FONT_COLOR . '">' . $entity_name . '</a>';
        } elseif ($uitype == 77) {
            $value = getUserName($adb->query_result($list_result, $list_result_count, 'inventorymanager'));
        } elseif ($uitype == 5 || $uitype == 6 || $uitype == 23 || $uitype == 70) {
            if ($temp_val != '' && $temp_val != '0000-00-00') {
                $value = getDisplayDate($temp_val);
            } elseif ($temp_val == '0000-00-00') {
                $value = '';
            } else {
                $value = $temp_val;
            }
        } elseif ($uitype == 15 || $uitype == 55 && $fieldname == "salutationtype") {
            $temp_val = decode_html($adb->query_result($list_result, $list_result_count, $colname));
            if ($is_admin == false && $profileGlobalPermission[1] == 1 && $profileGlobalPermission[2] == 1 && $temp_val != '') {
                $temp_acttype = $adb->query_result($list_result, $list_result_count, 'activitytype');
                if ($temp_acttype != 'Task' && $fieldname == "taskstatus") {
                    $temptable = "eventstatus";
                } else {
                    $temptable = $fieldname;
                }
                $roleid = $current_user->roleid;
                $roleids = array();
                $subrole = getRoleSubordinates($roleid);
                if (count($subrole) > 0) {
                    $roleids = $subrole;
                }
                array_push($roleids, $roleid);
                //here we are checking wheather the table contains the sortorder column .If  sortorder is present in the main picklist table, then the role2picklist will be applicable for this table...
                $sql = "select * from vtiger_{$temptable} where {$temptable}=?";
                $res = $adb->pquery($sql, array(decode_html($temp_val)));
                $picklistvalueid = $adb->query_result($res, 0, 'picklist_valueid');
                if ($picklistvalueid != null) {
                    $pick_query = "select * from vtiger_role2picklist where picklistvalueid={$picklistvalueid} and roleid in (" . generateQuestionMarks($roleids) . ")";
                    $res_val = $adb->pquery($pick_query, array($roleids));
                    $num_val = $adb->num_rows($res_val);
//.........这里部分代码省略.........
开发者ID:latechdirect,项目名称:vtiger,代码行数:101,代码来源:ListViewUtils.php

示例15: array

    }
    $sql = 'select vtiger_users.*,vtiger_invitees.* from vtiger_invitees left join vtiger_users on vtiger_invitees.inviteeid=vtiger_users.id where activityid=?';
    $result = $adb->pquery($sql, array($focus->id));
    $num_rows = $adb->num_rows($result);
    $invited_users = array();
    for ($i = 0; $i < $num_rows; $i++) {
        $userid = $adb->query_result($result, $i, 'inviteeid');
        $username = getFullNameFromQResult($result, $i, 'Users');
        $invited_users[$userid] = $username;
    }
    $smarty->assign("INVITEDUSERS", $invited_users);
    $related_array = getRelatedListsInformation("Calendar", $focus);
    $fieldsname = $related_array['Contacts']['header'];
    $contact_info = $related_array['Contacts']['entries'];
    $entityIds = array_keys($contact_info);
    $displayValueArray = getEntityName('Contacts', $entityIds);
    $entityname = array();
    if (!empty($displayValueArray)) {
        foreach ($displayValueArray as $key => $field_value) {
            $entityname[$key] = '<a href="index.php?module=Contacts&action=DetailView&record=' . $key . '">' . $field_value . '</a>';
        }
    }
    $smarty->assign("CONTACTS", $entityname);
    $is_fname_permitted = getFieldVisibilityPermission("Contacts", $current_user->id, 'firstname');
    $smarty->assign("IS_PERMITTED_CNT_FNAME", $is_fname_permitted);
}
global $theme;
$theme_path = "themes/" . $theme . "/";
$image_path = $theme_path . "images/";
$log->info("Calendar-Activities detail view");
$category = getParentTab();
开发者ID:casati-dolibarr,项目名称:corebos,代码行数:31,代码来源:EventDetailView.php


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