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


PHP QueryGenerator::getModuleNameFields方法代码示例

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


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

示例1: getListViewEntries


//.........这里部分代码省略.........
                         }
                     }
                     $value = implode(', ', $tmpArray);
                     $value = textlength_check($value);
                 }
             } elseif ($field->getFieldDataType() == 'skype') {
                 $value = $value != "" ? "<a href='skype:{$value}?call'>" . textlength_check($value) . "</a>" : "";
             } elseif ($field->getFieldDataType() == 'phone') {
                 if ($useAsterisk == 'true') {
                     $value = "<a href='javascript:;' onclick='startCall(&quot;{$value}&quot;, " . "&quot;{$recordId}&quot;)'>" . textlength_check($value) . "</a>";
                 } else {
                     $value = textlength_check($value);
                 }
             } elseif ($field->getFieldDataType() == 'reference') {
                 $referenceFieldInfoList = $this->queryGenerator->getReferenceFieldInfoList();
                 $moduleList = $referenceFieldInfoList[$fieldName];
                 if (count($moduleList) == 1) {
                     $parentModule = $moduleList[0];
                 } else {
                     $parentModule = $this->typeList[$value];
                 }
                 if (!empty($value) && !empty($this->nameList[$fieldName]) && !empty($parentModule)) {
                     $parentMeta = $this->queryGenerator->getMeta($parentModule);
                     $value = textlength_check($this->nameList[$fieldName][$value]);
                     if ($parentMeta->isModuleEntity() && $parentModule != "Users") {
                         $value = "<a href='index.php?module={$parentModule}&action=DetailView&" . "record={$rawValue}' title='" . getTranslatedString($parentModule, $parentModule) . "'>{$value}</a>";
                     }
                 } else {
                     $value = '--';
                 }
             } elseif ($field->getFieldDataType() == 'owner') {
                 $value = textlength_check($this->ownerNameList[$fieldName][$value]);
             } elseif ($field->getUIType() == 25) {
                 //TODO clean request object reference.
                 $contactId = $_REQUEST['record'];
                 $emailId = $this->db->query_result($result, $i, "activityid");
                 $result1 = $this->db->pquery("SELECT access_count FROM vtiger_email_track WHERE " . "crmid=? AND mailid=?", array($contactId, $emailId));
                 $value = $this->db->query_result($result1, 0, "access_count");
                 if (!$value) {
                     $value = 0;
                 }
             } elseif ($field->getUIType() == 8) {
                 if (!empty($value)) {
                     $temp_val = html_entity_decode($value, ENT_QUOTES, $default_charset);
                     $json = new Zend_Json();
                     $value = vt_suppressHTMLTags(implode(',', $json->decode($temp_val)));
                 }
             } elseif (in_array($uitype, array(7, 9, 90))) {
                 $value = "<span align='right'>" . textlength_check($value) . "</div>";
             } elseif ($field->getUIType() == 55) {
                 $value = getTranslatedString($value, $currentModule);
             } else {
                 $value = textlength_check($value);
             }
             $parenttab = getParentTab();
             $nameFields = $this->queryGenerator->getModuleNameFields($module);
             $nameFieldList = explode(',', $nameFields);
             if (in_array($fieldName, $nameFieldList) && $module != 'Emails') {
                 $value = "<a href='index.php?module={$module}&parenttab={$parenttab}&action=DetailView&record=" . "{$recordId}' title='" . getTranslatedString($module, $module) . "'>{$value}</a>";
             } elseif ($fieldName == $focus->list_link_field && $module != 'Emails') {
                 $value = "<a href='index.php?module={$module}&parenttab={$parenttab}&action=DetailView&record=" . "{$recordId}' title='" . getTranslatedString($module, $module) . "'>{$value}</a>";
             }
             // vtlib customization: For listview javascript triggers
             $value = "{$value} <span type='vtlib_metainfo' vtrecordid='{$recordId}' vtfieldname=" . "'{$fieldName}' vtmodule='{$module}' style='display:none;'></span>";
             // END
             $row[] = $value;
         }
         //Added for Actions ie., edit and delete links in listview
         $actionLinkInfo = "";
         if (isPermitted($module, "EditView", "") == 'yes') {
             $edit_link = $this->getListViewEditLink($module, $recordId);
             if (isset($navigationInfo['start']) && $navigationInfo['start'] > 1 && $module != 'Emails') {
                 $actionLinkInfo .= "<a href=\"{$edit_link}&start=" . $navigationInfo['start'] . "\">" . getTranslatedString("LNK_EDIT", $module) . "</a> ";
             } else {
                 $actionLinkInfo .= "<a href=\"{$edit_link}\">" . getTranslatedString("LNK_EDIT", $module) . "</a> ";
             }
         }
         if (isPermitted($module, "Delete", "") == 'yes') {
             $del_link = $this->getListViewDeleteLink($module, $recordId);
             if ($actionLinkInfo != "" && $del_link != "") {
                 $actionLinkInfo .= " | ";
             }
             if ($del_link != "") {
                 $actionLinkInfo .= "<a href='javascript:confirmdelete(\"" . addslashes(urlencode($del_link)) . "\")'>" . getTranslatedString("LNK_DELETE", $module) . "</a>";
             }
         }
         // Record Change Notification
         if (method_exists($focus, 'isViewed') && PerformancePrefs::getBoolean('LISTVIEW_RECORD_CHANGE_INDICATOR', true)) {
             if (!$focus->isViewed($recordId)) {
                 $actionLinkInfo .= " | <img src='" . vtiger_imageurl('important1.gif', $theme) . "' border=0>";
             }
         }
         // END
         if ($actionLinkInfo != "" && !$skipActions) {
             $row[] = $actionLinkInfo;
         }
         $data[$recordId] = $row;
     }
     return $data;
 }
开发者ID:mslokhat,项目名称:corebos,代码行数:101,代码来源:ListViewController.php

示例2: getListViewEntries


//.........这里部分代码省略.........
                        $value = textlength_check($this->nameList[$fieldName][$value]);
                        if ($parentMeta->isModuleEntity() && $parentModule != "Users") {
                            $value = "<a href='index.php?module={$parentModule}&action=DetailView&" . "record={$rawValue}' title='" . getTranslatedString($parentModule, $parentModule) . "'>{$value}</a>";
                            $modMetaInfo = getEntityFieldNames($parentModule);
                            $fieldName = is_array($modMetaInfo['fieldname']) ? $modMetaInfo['fieldname'][0] : $modMetaInfo['fieldname'];
                            // vtlib customization: For listview javascript triggers
                            $value = "{$value} <span type='vtlib_metainfo' vtrecordid='{$rawValue}' vtfieldname=" . "'{$fieldName}' vtmodule='{$parentModule}' style='display:none;'></span>";
                        }
                    } else {
                        $value = '--';
                    }
                } elseif ($field->getFieldDataType() == 'owner') {
                    if ($fieldName != 'assigned_user_id' && strstr($fieldName, ".assigned_user_id")) {
                        $value = textlength_check($this->ownerNameListrel[$fieldName][$value]);
                    } else {
                        $value = textlength_check($this->ownerNameList[$fieldName][$value]);
                    }
                } elseif ($field->getUIType() == 25) {
                    //TODO clean request object reference.
                    $contactId = $_REQUEST['record'];
                    $emailId = $this->db->query_result($result, $i, "activityid");
                    $result1 = $this->db->pquery("SELECT access_count FROM vtiger_email_track WHERE " . "crmid=? AND mailid=?", array($contactId, $emailId));
                    $value = $this->db->query_result($result1, 0, "access_count");
                    if (!$value) {
                        $value = 0;
                    }
                } elseif ($field->getUIType() == 8) {
                    if (!empty($value)) {
                        $temp_val = html_entity_decode($value, ENT_QUOTES, $default_charset);
                        $json = new Zend_Json();
                        $value = vt_suppressHTMLTags(implode(',', $json->decode($temp_val)));
                    }
                } elseif (in_array($uitype, array(7, 9, 90))) {
                    $value = "<span align='right'>" . textlength_check($value) . "</div>";
                } elseif ($field->getUIType() == 55) {
                    $value = getTranslatedString($value, $currentModule);
                } elseif ($module == 'Emails' && $fieldName == 'subject') {
                    $value = '<a href="javascript:;" onClick="ShowEmail(\'' . $recordId . '\');">' . textlength_check($value) . '</a>';
                } else {
                    $value = textlength_check($value);
                }
                if ($field->getFieldDataType() != 'reference') {
                    $parenttab = getParentTab();
                    $nameFields = $this->queryGenerator->getModuleNameFields($module);
                    $nameFieldList = explode(',', $nameFields);
                    if (($fieldName == $focus->list_link_field or in_array($fieldName, $nameFieldList)) && $module != 'Emails') {
                        $opennewtab = GlobalVariable::getVariable('Application_OpenRecordInNewXOnListView', '', $module);
                        if ($opennewtab == '') {
                            $value = "<a href='index.php?module={$module}&parenttab={$parenttab}&action=DetailView&record=" . "{$recordId}' title='" . getTranslatedString($module, $module) . "'>{$value}</a>";
                        } elseif ($opennewtab == 'window') {
                            $value = "<a href='#' onclick='window.open(\"index.php?module={$module}&parenttab={$parenttab}&action=DetailView&record=" . "{$recordId}\", \"{$module}-{$entity_id}\", \"width=1300, height=900, scrollbars=yes\"); return false;' title='" . getTranslatedString($module, $module) . "'>{$value}</a>";
                        } else {
                            $value = "<a href='index.php?module={$module}&parenttab={$parenttab}&action=DetailView&record=" . "{$recordId}' title='" . getTranslatedString($module, $module) . "' target='_blank'>{$value}</a>";
                        }
                    }
                    // vtlib customization: For listview javascript triggers
                    $value = "{$value} <span type='vtlib_metainfo' vtrecordid='{$recordId}' vtfieldname=" . "'{$fieldName}' vtmodule='{$module}' style='display:none;'></span>";
                }
                $row[] = $value;
            }
            //Added for Actions ie., edit and delete links in listview
            $actionLinkInfo = "";
            if (isPermitted($module, "EditView", "") == 'yes') {
                $racbr = $wfs->getRACRuleForRecord($currentModule, $recordId);
                if (!$racbr or $racbr->hasListViewPermissionTo('edit')) {
                    $edit_link = $this->getListViewEditLink($module, $recordId);
                    if (isset($navigationInfo['start']) && $navigationInfo['start'] > 1 && $module != 'Emails') {
                        $actionLinkInfo .= "<a href=\"{$edit_link}&start=" . $navigationInfo['start'] . "\">" . getTranslatedString("LNK_EDIT", $module) . "</a> ";
                    } else {
                        $actionLinkInfo .= "<a href=\"{$edit_link}\">" . getTranslatedString("LNK_EDIT", $module) . "</a> ";
                    }
                }
            }
            if (isPermitted($module, "Delete", "") == 'yes') {
                $racbr = $wfs->getRACRuleForRecord($currentModule, $recordId);
                if (!$racbr or $racbr->hasListViewPermissionTo('delete')) {
                    $del_link = $this->getListViewDeleteLink($module, $recordId);
                    if ($actionLinkInfo != "" && $del_link != "") {
                        $actionLinkInfo .= ' | ';
                    }
                    if ($del_link != "") {
                        $actionLinkInfo .= "<a href='javascript:confirmdelete(\"" . addslashes(urlencode($del_link)) . "\")'>" . getTranslatedString('LNK_DELETE', $module) . '</a>';
                    }
                }
            }
            // Record Change Notification
            if (method_exists($focus, 'isViewed') && PerformancePrefs::getBoolean('LISTVIEW_RECORD_CHANGE_INDICATOR', true)) {
                if (!$focus->isViewed($recordId)) {
                    $actionLinkInfo .= " | <img src='" . vtiger_imageurl('important1.gif', $theme) . "' border=0>";
                }
            }
            // END
            if ($actionLinkInfo != "" && !$skipActions) {
                $row[] = $actionLinkInfo;
            }
            list($row, $unused, $unused2) = cbEventHandler::do_filter('corebos.filter.listview.render', array($row, $this->db->query_result_rowdata($result, $i), $recordId));
            $data[$recordId] = $row;
        }
        return $data;
    }
开发者ID:kduqi,项目名称:corebos,代码行数:101,代码来源:ListViewController.php


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