本文整理汇总了PHP中CustomView_Record_Model类的典型用法代码示例。如果您正苦于以下问题:PHP CustomView_Record_Model类的具体用法?PHP CustomView_Record_Model怎么用?PHP CustomView_Record_Model使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CustomView_Record_Model类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: showAdvancedSearch
/**
* Function to display the UI for advance search on any of the module
* @param Vtiger_Request $request
*/
function showAdvancedSearch(Vtiger_Request $request)
{
//Modules for which search is excluded
$excludedModuleForSearch = array('Vtiger', 'Reports');
$viewer = $this->getViewer($request);
$moduleName = $request->getModule();
if ($request->get('source_module')) {
$moduleName = $request->get('source_module');
}
$saveFilterPermitted = true;
$saveFilterexcludedModules = array('ModComments', 'RSS', 'Portal', 'Integration', 'PBXManager', 'DashBoard');
if (in_array($moduleName, $saveFilterexcludedModules)) {
$saveFilterPermitted = false;
}
//See if it is an excluded module, If so search in home module
if (in_array($moduleName, $excludedModuleForSearch)) {
$moduleName = 'Home';
}
$module = $request->getModule();
$customViewModel = new CustomView_Record_Model();
$customViewModel->setModule($moduleName);
$moduleModel = Vtiger_Module_Model::getInstance($moduleName);
$recordStructureInstance = Vtiger_RecordStructure_Model::getInstanceForModule($moduleModel);
$viewer->assign('SEARCHABLE_MODULES', Vtiger_Module_Model::getSearchableModules());
$viewer->assign('CUSTOMVIEW_MODEL', $customViewModel);
if ($moduleName == 'Calendar') {
$advanceFilterOpsByFieldType = Calendar_Field_Model::getAdvancedFilterOpsByFieldType();
} else {
$advanceFilterOpsByFieldType = Vtiger_Field_Model::getAdvancedFilterOpsByFieldType();
}
$viewer->assign('ADVANCED_FILTER_OPTIONS', Vtiger_Field_Model::getAdvancedFilterOptions());
$viewer->assign('ADVANCED_FILTER_OPTIONS_BY_TYPE', $advanceFilterOpsByFieldType);
$dateFilters = Vtiger_Field_Model::getDateFilterTypes();
foreach ($dateFilters as $comparatorKey => $comparatorInfo) {
$comparatorInfo['startdate'] = DateTimeField::convertToUserFormat($comparatorInfo['startdate']);
$comparatorInfo['enddate'] = DateTimeField::convertToUserFormat($comparatorInfo['enddate']);
$comparatorInfo['label'] = vtranslate($comparatorInfo['label'], $module);
$dateFilters[$comparatorKey] = $comparatorInfo;
}
$viewer->assign('DATE_FILTERS', $dateFilters);
$viewer->assign('RECORD_STRUCTURE', $recordStructureInstance->getStructure());
$viewer->assign('SOURCE_MODULE', $moduleName);
$viewer->assign('SOURCE_MODULE_MODEL', $moduleModel);
$viewer->assign('MODULE', $module);
$viewer->assign('SAVE_FILTER_PERMITTED', $saveFilterPermitted);
$viewer->assign('USER_MODEL', Users_Record_Model::getCurrentUserModel());
echo $viewer->view('AdvanceSearch.tpl', $moduleName, true);
}
开发者ID:Bergdahls,项目名称:YetiForceCRM,代码行数:52,代码来源:BasicAjax.php
示例2: preProcess
function preProcess(Vtiger_Request $request, $display = true)
{
global $current_user;
parent::preProcess($request, false);
$viewer = $this->getViewer($request);
$moduleName = $request->getModule();
$listViewModel = Vtiger_ListView_Model::getInstance($moduleName);
$linkParams = array('MODULE' => $moduleName, 'ACTION' => $request->get('view'));
$viewer->assign('CUSTOM_VIEWS', CustomView_Record_Model::getAllByGroup($moduleName));
$this->viewName = $request->get('viewname');
if (empty($this->viewName)) {
//If not view name exits then get it from custom view
//This can return default view id or view id present in session
$customView = new CustomView();
$this->viewName = $customView->getViewId($moduleName);
}
$quickLinkModels = $listViewModel->getSideBarLinks($linkParams);
$viewer->assign('QUICK_LINKS', $quickLinkModels);
$this->initializeListViewContents($request, $viewer);
$viewer->assign('VIEWID', $this->viewName);
//Modified by jmangarret 16jun2015
$viewer->assign('ROLEID', $current_user->roleid);
if ($display) {
$this->preProcessDisplay($request);
}
}
开发者ID:jmangarret,项目名称:vtigercrm,代码行数:26,代码来源:List.php
示例3: process
public function process(Vtiger_Request $request)
{
${"GLOBALS"}["fgwbuhrxu"] = "adb";
$symwrz = "customViewModel";
${${"GLOBALS"}["fgwbuhrxu"]} = PearDatabase::getInstance();
$cerakpgxi = "recordIds";
${"GLOBALS"}["ydhdsoshkjcr"] = "params";
$cwhzpepgkpy = "params";
${${"GLOBALS"}["ydhdsoshkjcr"]} = $request->getAll();
${${"GLOBALS"}["igosddeyg"]} = (int) ${$cwhzpepgkpy}["viewname"];
${"GLOBALS"}["eqmrcofnhqq"] = "customViewModel";
${$symwrz} = CustomView_Record_Model::getInstanceById(${${"GLOBALS"}["igosddeyg"]});
if (${${"GLOBALS"}["eqmrcofnhqq"]}) {
${${"GLOBALS"}["virgnuvno"]} = $request->get("search_key");
${"GLOBALS"}["qeosukvsm"] = "searchValue";
${"GLOBALS"}["vrykqprgdfxc"] = "recordIds";
${${"GLOBALS"}["qeosukvsm"]} = $request->get("search_value");
${${"GLOBALS"}["mnhnltytyh"]} = $request->get("operator");
if (!empty(${${"GLOBALS"}["mnhnltytyh"]})) {
$customViewModel->set("operator", ${${"GLOBALS"}["mnhnltytyh"]});
${"GLOBALS"}["yvrscvp"] = "searchValue";
$customViewModel->set("search_key", ${${"GLOBALS"}["virgnuvno"]});
$customViewModel->set("search_value", ${${"GLOBALS"}["yvrscvp"]});
}
${${"GLOBALS"}["vrykqprgdfxc"]} = $customViewModel->getRecordIds(array(), $customViewModel->getModule());
}
die(json_encode(array("ids" => ${$cerakpgxi})));
}
开发者ID:cin-system,项目名称:cinrepo,代码行数:28,代码来源:GetSelectedIds.php
示例4: getRecordsListFromRequest
function getRecordsListFromRequest(Vtiger_Request $request)
{
global $log;
$log->debug("Entering ./views/IndexAjax.php::getRecordsListFromRequest");
$cvId = $request->get('cvid');
$selectedIds = $request->get('selected_ids');
$excludedIds = $request->get('excluded_ids');
if (!empty($selectedIds) && $selectedIds != 'all') {
if (!empty($selectedIds) && count($selectedIds) > 0) {
return $selectedIds;
}
}
$customViewModel = CustomView_Record_Model::getInstanceById($cvId);
if ($customViewModel) {
$searchKey = $request->get('search_key');
$searchValue = $request->get('search_value');
$operator = $request->get('operator');
if (!empty($operator)) {
$customViewModel->set('operator', $operator);
$customViewModel->set('search_key', $searchKey);
$customViewModel->set('search_value', $searchValue);
}
return $customViewModel->getRecordIds($excludedIds);
}
}
开发者ID:cin-system,项目名称:cinrepo,代码行数:25,代码来源:IndexAjax.php
示例5: process
function process(Vtiger_Request $request)
{
global $log;
$log->debug("Entering ./views/MiniListWizard.php::process");
$currentUser = Users_Record_Model::getCurrentUserModel();
$viewer = $this->getViewer($request);
$moduleName = $request->getModule();
$viewer->assign('MODULE_NAME', $moduleName);
$viewer->assign('WIZARD_STEP', $request->get('step'));
switch ($request->get('step')) {
case 'step1':
$modules = Vtiger_Module_Model::getSearchableModules();
//Since comments is not treated as seperate module
unset($modules['ModComments']);
$viewer->assign('MODULES', $modules);
break;
case 'step2':
$selectedModule = $request->get('selectedModule');
$filters = CustomView_Record_Model::getAllByGroup($selectedModule);
$viewer->assign('ALLFILTERS', $filters);
break;
case 'step3':
$selectedModule = $request->get('selectedModule');
$filterid = $request->get('filterid');
$db = PearDatabase::getInstance();
$generator = new QueryGenerator($selectedModule, $currentUser);
$generator->initForCustomViewById($filterid);
$listviewController = new ListViewController($db, $currentUser, $generator);
$listviewController->getListViewHeaderFields();
$viewer->assign('LIST_VIEW_CONTROLLER', $listviewController);
$viewer->assign('SELECTED_MODULE', $selectedModule);
break;
}
$viewer->view('dashboards/MiniListWizard.tpl', $moduleName);
}
开发者ID:cin-system,项目名称:cinrepo,代码行数:35,代码来源:MiniListWizard.php
示例6: getCVModelFromRequest
private function getCVModelFromRequest(Vtiger_Request $request) {
$cvId = $request->get('cvid');
if (!empty($cvId)) {
$customViewModel = CustomView_Record_Model::getInstanceById($cvId);
} else {
$customViewModel = CustomView_Record_Model::getCleanInstance();
$customViewModel->setModule($request->get('source_module'));
}
$customViewData = array(
'cvid' => $cvId,
'viewname' => $customViewModel->get('viewname'),
'setdefault' => $customViewModel->get('setdefault'),
'setmetrics' => $customViewModel->get('setmetrics'),
'status' => $customViewModel->get('status')
);
$selectedColumnsList = $request->get('columnslist');
if (!empty($selectedColumnsList)) {
$customViewData['columnslist'] = $selectedColumnsList;
}
return $customViewModel->setData($customViewData);
}
开发者ID:Wasage,项目名称:werpa,代码行数:25,代码来源:Save.php
示例7: getRecordsListFromRequest
protected function getRecordsListFromRequest(Vtiger_Request $request)
{
$cvId = $request->get('viewname');
$module = $request->get('module');
if (!empty($cvId) && $cvId == "undefined") {
$sourceModule = $request->get('sourceModule');
$cvId = CustomView_Record_Model::getAllFilterByModule($sourceModule)->getId();
}
$selectedIds = $request->get('selected_ids');
$excludedIds = $request->get('excluded_ids');
if (!empty($selectedIds) && $selectedIds != 'all') {
if (!empty($selectedIds) && count($selectedIds) > 0) {
return $selectedIds;
}
}
$customViewModel = CustomView_Record_Model::getInstanceById($cvId);
if ($customViewModel) {
$searchKey = $request->get('search_key');
$searchValue = $request->get('search_value');
$operator = $request->get('operator');
if (!empty($operator)) {
$customViewModel->set('operator', $operator);
$customViewModel->set('search_key', $searchKey);
$customViewModel->set('search_value', $searchValue);
}
$customViewModel->set('search_params', $request->get('search_params'));
return $customViewModel->getRecordIds($excludedIds, $module);
}
}
开发者ID:cannking,项目名称:vtigercrm-debug,代码行数:29,代码来源:Mass.php
示例8: showTree
public function showTree(Vtiger_Request $request)
{
$moduleName = $request->getModule();
$sourceModule = $request->get('selectedModule');
$viewer = $this->getViewer($request);
$this->template = $this->getTemplate();
if ($this->template) {
$recordModel = Settings_TreesManager_Record_Model::getInstanceById($this->template);
} else {
Vtiger_Functions::throwNewException(vtranslate('ERR_TREE_NOT_FOUND', $moduleName));
}
if (!$recordModel) {
Vtiger_Functions::throwNewException(vtranslate('ERR_TREE_NOT_FOUND', $moduleName));
}
if (!in_array($sourceModule, $this->modules)) {
Vtiger_Functions::throwNewException(vtranslate('ERR_MODULE_NOT_FOUND', $moduleName));
}
$tree = $this->getCategory();
$treeWithItems = $this->getRecords();
$tree = array_merge($tree, $treeWithItems);
$viewer->assign('TREE', Zend_Json::encode($tree));
$viewer->assign('MODULES', $this->modules);
$viewer->assign('MODULE', $moduleName);
$viewer->assign('SELECTED_MODULE_NAME', $sourceModule);
$viewer->assign('CUSTOM_VIEWS', CustomView_Record_Model::getAllByGroup($moduleName));
$viewer->view('AccountsListTree.tpl', $moduleName);
}
开发者ID:Bergdahls,项目名称:YetiForceCRM,代码行数:27,代码来源:AccountsListTree.php
示例9: process
public function process(Vtiger_Request $request)
{
$viewer = $this->getViewer($request);
$moduleName = $request->get('source_module');
$module = $request->getModule();
$record = $request->get('record');
$moduleModel = Vtiger_Module_Model::getInstance($moduleName);
$recordStructureInstance = Vtiger_RecordStructure_Model::getInstanceForModule($moduleModel);
if (!empty($record)) {
$customViewModel = CustomView_Record_Model::getInstanceById($record);
$viewer->assign('MODE', 'edit');
} else {
$customViewModel = new CustomView_Record_Model();
$customViewModel->setModule($moduleName);
$viewer->assign('MODE', '');
}
$viewer->assign('ADVANCE_CRITERIA', $customViewModel->transformToNewAdvancedFilter());
$viewer->assign('CURRENTDATE', date('Y-n-j'));
$viewer->assign('DATE_FILTERS', Vtiger_Field_Model::getDateFilterTypes());
if ($moduleName == 'Calendar') {
$advanceFilterOpsByFieldType = Calendar_Field_Model::getAdvancedFilterOpsByFieldType();
} else {
$advanceFilterOpsByFieldType = Vtiger_Field_Model::getAdvancedFilterOpsByFieldType();
}
$viewer->assign('ADVANCED_FILTER_OPTIONS', Vtiger_Field_Model::getAdvancedFilterOptions());
$viewer->assign('ADVANCED_FILTER_OPTIONS_BY_TYPE', $advanceFilterOpsByFieldType);
$dateFilters = Vtiger_Field_Model::getDateFilterTypes();
foreach ($dateFilters as $comparatorKey => $comparatorInfo) {
$comparatorInfo['startdate'] = DateTimeField::convertToUserFormat($comparatorInfo['startdate']);
$comparatorInfo['enddate'] = DateTimeField::convertToUserFormat($comparatorInfo['enddate']);
$comparatorInfo['label'] = vtranslate($comparatorInfo['label'], $module);
$dateFilters[$comparatorKey] = $comparatorInfo;
}
$viewer->assign('DATE_FILTERS', $dateFilters);
$viewer->assign('RECORD_STRUCTURE_MODEL', $recordStructureInstance);
$viewer->assign('RECORD_STRUCTURE', $recordStructureInstance->getStructure());
$viewer->assign('CUSTOMVIEW_MODEL', $customViewModel);
$viewer->assign('RECORD_ID', $record);
$viewer->assign('MODULE', $module);
$viewer->assign('SOURCE_MODULE', $moduleName);
$viewer->assign('USER_MODEL', Users_Record_Model::getCurrentUserModel());
$viewer->assign('CV_PRIVATE_VALUE', CustomView_Record_Model::CV_STATUS_PRIVATE);
$viewer->assign('CV_PENDING_VALUE', CustomView_Record_Model::CV_STATUS_PENDING);
$viewer->assign('CV_PUBLIC_VALUE', CustomView_Record_Model::CV_STATUS_PUBLIC);
$viewer->assign('MODULE_MODEL', $moduleModel);
echo $viewer->view('EditView.tpl', $module, true);
}
开发者ID:nouphet,项目名称:vtigercrm-6.0.0-ja,代码行数:47,代码来源:EditAjax.php
示例10: process
public function process(Vtiger_Request $request)
{
$customViewModel = CustomView_Record_Model::getInstanceById($request->get('record'));
$moduleModel = $customViewModel->getModule();
$customViewModel->delete();
$listViewUrl = $moduleModel->getListViewUrl();
header("Location: {$listViewUrl}");
}
开发者ID:yozhi,项目名称:YetiForceCRM,代码行数:8,代码来源:Delete.php
示例11: postProcess
public function postProcess(Vtiger_Request $request)
{
$moduleName = $request->getModule();
$viewer = $this->getViewer($request);
$viewer->assign('CUSTOM_VIEWS', CustomView_Record_Model::getAllByGroup($moduleName));
$viewer->view('TreeRecordsPostProcess.tpl', $moduleName);
parent::postProcess($request);
}
开发者ID:nikdejan,项目名称:YetiForceCRM,代码行数:8,代码来源:TreeRecords.php
示例12: handleEvent
public function handleEvent($handlerType, $entityData)
{
switch ($handlerType) {
case 'vtiger.dispatch.before':
return;
require_once 'modules/SwVtTools/filecache.php';
$cacheFile = vglobal('root_directory') . '/modules/SwVtTools/cache/Module.php';
if (!file_exists($cacheFile) || $_REQUEST['clearcache'] == '1') {
swtools_filecache(glob(vglobal('root_directory') . '/modules/*/models/Module.php'), $cacheFile);
}
require_once $cacheFile;
break;
case 'vtiger.process.customview.editajax.view.finish':
if (empty(self::$DATA['recordId'])) {
return;
}
$content = ob_get_contents();
ob_end_clean();
$customViewModel = CustomView_Record_Model::getInstanceById(self::$DATA['recordId']);
$blocks = \SwVtTools\VtUtils::getFieldsWithBlocksForModule(self::$DATA['moduleName']);
$html = '<h4 class="filterHeaders">Filter Sort Order:</h4><br/>';
$html .= '<div class="contentsBackground well">';
$html .= '
<table cellpadding="4" cellspacing="0" width="100%" border="0">
<tbody><tr>
<td class="dvtCellInfo" width="5%" align="right">Column:
</td>
<td class="dvtCellInfo" width="20%">
<select name="order_col" id="order_col" class="chzn-select">
<option value="">' . getTranslatedString('LBL_NONE') . '</option>';
foreach ($blocks as $blockLabel => $fields) {
$html .= '<optgroup label="' . $blockLabel . '">';
foreach ($fields as $field) {
$html .= '<option ' . ($customViewModel->get('order_col') == $field->name ? 'selected="selected"' : '') . ' value="' . $field->name . '">' . $field->label . '</option>';
}
$html .= '</optgroup>';
}
$html .= '</select>
</td>
<td class="dvtCellInfo" width="20%">
<select name="order_dir" id="order_dir" class="small">
<option value="ASC" ' . ($customViewModel->get('order_dir') == 'ASC' ? 'selected="selected"' : '') . '>↑ ASC Ascending</option>
<option value="DESC" ' . ($customViewModel->get('order_dir') == 'DESC' ? 'selected="selected"' : '') . '>↓ DESC Descending</option>
</select>
</td>
<td class="dvtCellInfo" width="10%" align="right">numerische Sortierung:
</td>
<td class="dvtCellInfo" width="15%">
<input type="checkbox" name="order_numeric_check" value="1" ' . ($customViewModel->get('order_numeric_check') > 0 ? 'checked="checked"' : '') . '>
Skip Chars: <input type="text" alt="ignore the first X chars to get a numberic value" title="ignore the first X chars to get a numberic value" style="width:20px;" name="order_numeric" value="' . $customViewModel->get('order_numeric') . '">
</td></tr></table>';
$html .= '</div>';
$content = str_replace('<div class="filterActions">', $html . '<div class="filterActions">', $content);
echo $content;
break;
}
}
开发者ID:Neodracir,项目名称:VtigerCRM-Tools,代码行数:58,代码来源:EventHandler.php
示例13: postProcess
public function postProcess(Vtiger_Request $request, $display = true)
{
$moduleName = $request->getModule();
$viewer = $this->getViewer($request);
$viewer->assign('CUSTOM_VIEWS', CustomView_Record_Model::getAllByGroup($moduleName));
if ($display) {
$this->postProcessDisplay($request);
}
parent::postProcess($request);
}
开发者ID:HoererUndFlamme,项目名称:YetiForceCRM,代码行数:10,代码来源:TreeRecords.php
示例14: process
public function process(Vtiger_Request $request)
{
$currentUser = Users_Record_Model::getCurrentUserModel();
$customViewModel = CustomView_Record_Model::getInstanceById($request->get('record'));
$moduleModel = $customViewModel->getModule();
if ($currentUser->isAdminUser()) {
$customViewModel->deny();
}
$listViewUrl = $moduleModel->getListViewUrl();
header("Location: {$listViewUrl}");
}
开发者ID:Bergdahls,项目名称:YetiForceCRM,代码行数:11,代码来源:Deny.php
示例15: process
function process(Vtiger_Request $request)
{
$relatedModuleName = $request->get('relatedModule');
$relatedMduleModel = Vtiger_Module_Model::getInstance($relatedModuleName);
$viewer = $this->getViewer($request);
$viewer->assign('DEFAULT_CUSTOM_FILTER_ID', $relatedMduleModel->getDefaultCustomFilter());
$viewer->assign('FOLDERS', Documents_Module_Model::getAllFolders());
$viewer->assign('CUSTOM_VIEWS', CustomView_Record_Model::getAllByGroup($relatedModuleName));
$viewer->assign('CURRENT_USER_MODEL', Users_Record_Model::getCurrentUserModel());
$viewer->view('CustomFilter.tpl', $request->getModule());
}
开发者ID:googlicius,项目名称:SP,代码行数:11,代码来源:CustomView.php
示例16: getInstance
/**
* Static Function to get the Instance of Vtiger ListView model for a given module and custom view
* @param <String> $moduleName - Module Name
* @param <Number> $viewId - Custom View Id
* @return Vtiger_ListView_Model instance
*/
public static function getInstance($moduleName, $sourceModule)
{
$db = PearDatabase::getInstance();
$currentUser = vglobal('current_user');
$modelClassName = Vtiger_Loader::getComponentClassName('Model', 'ListView', $moduleName);
$instance = new $modelClassName();
$sourceModuleModel = Vtiger_Module_Model::getInstance($sourceModule);
$queryGenerator = new QueryGenerator($sourceModuleModel->get('name'), $currentUser);
$cvidObj = CustomView_Record_Model::getAllFilterByModule($sourceModuleModel->get('name'));
$cvid = $cvidObj->getId('cvid');
$queryGenerator->initForCustomViewById($cvid);
$controller = new ListViewController($db, $currentUser, $queryGenerator);
return $instance->set('module', $sourceModuleModel)->set('query_generator', $queryGenerator)->set('listview_controller', $controller);
}
开发者ID:Bergdahls,项目名称:YetiForceCRM,代码行数:20,代码来源:ListView.php
示例17: process
function process(Vtiger_Request $request)
{
$moduleName = $request->getModule();
$relatedModuleName = $request->get('relatedModule');
$parentId = $request->get('record');
$label = $request->get('tab_label');
$parentRecordModel = Vtiger_Record_Model::getInstanceById($parentId, $moduleName);
$relationListView = Vtiger_RelationListView_Model::getInstance($parentRecordModel, $relatedModuleName, $label);
$relationModel = $relationListView->getRelationModel();
$viewer = $this->getViewer($request);
if (array_key_exists($relatedModuleName, $relationModel->getEmailEnabledModulesInfoForDetailView())) {
$viewer->assign('CUSTOM_VIEWS', CustomView_Record_Model::getAllByGroup($relatedModuleName));
$viewer->assign('STATUS_VALUES', $relationModel->getCampaignRelationStatusValues());
$viewer->assign('SELECTED_IDS', $request->get('selectedIds'));
$viewer->assign('EXCLUDED_IDS', $request->get('excludedIds'));
}
return parent::process($request);
}
开发者ID:xrstf,项目名称:vtiger-mirror,代码行数:18,代码来源:RelatedList.php
示例18: getBaseModuleRecordIds
protected function getBaseModuleRecordIds(Vtiger_Request $request)
{
$cvId = $request->get('viewname');
$module = $request->get('from_module');
$selectedIds = $request->get('selected_ids');
$excludedIds = $request->get('excluded_ids');
if (!empty($selectedIds) && $selectedIds != 'all') {
if (!empty($selectedIds) && count($selectedIds) > 0) {
return $selectedIds;
}
}
if ($selectedIds == 'all') {
$customViewModel = CustomView_Record_Model::getInstanceById($cvId);
if ($customViewModel) {
return $customViewModel->getRecordIds($excludedIds, $module);
}
}
return array();
}
开发者ID:Bergdahls,项目名称:YetiForceCRM,代码行数:19,代码来源:GeneratePotentials.php
示例19: process
public function process(Vtiger_Request $request) {
$viewer = $this->getViewer ($request);
$moduleName = $request->getModule();
$qualifiedModuleName = $request->getModule(false);
$module = Vtiger_Functions::getModuleName($request->get("module_id"));
$adb = PearDatabase::getInstance();
$sql = "select * from vtiger_customview where viewname = ? and entitytype = ? and status = ?";
$result = $adb->pquery($sql, array('All', $module, 0));
while($row = $adb->fetchByAssoc($result)){
$record = $row['cvid'];
}
$customViewModel = CustomView_Record_Model::getInstanceById($record);
$moduleModel = Vtiger_Module_Model::getInstance($module);
$recordStructureInstance = Vtiger_RecordStructure_Model::getInstanceForModule($moduleModel);
$recordStructure = $recordStructureInstance->getStructure();
$viewer->assign('CUSTOMVIEW_MODEL', $customViewModel);
$viewer->assign('RECORD_STRUCTURE', $recordStructure);
$viewer->assign('RECORD_ID', $record);
$viewer->assign('SOURCE_MODULE', $module);
$viewer->assign('MODULENAME', $moduleName);
echo $viewer->view('List2.tpl', $qualifiedModuleName,true);
}
开发者ID:Wasage,项目名称:werpa,代码行数:24,代码来源:List2.php
示例20: getRecordsListFromRequest
public function getRecordsListFromRequest(Vtiger_Request $request)
{
global $log;
$log->debug("Entering ./views/ComposeEmail.php::getRecordsListFromRequest");
$cvId = $request->get('viewname');
$selectedIds = $request->get('selected_ids');
$excludedIds = $request->get('excluded_ids');
if (!empty($selectedIds) && $selectedIds != 'all') {
if (!empty($selectedIds) && count($selectedIds) > 0) {
return $selectedIds;
}
}
$sourceRecord = $request->get('sourceRecord');
$sourceModule = $request->get('sourceModule');
if ($sourceRecord && $sourceModule) {
$sourceRecordModel = Vtiger_Record_Model::getInstanceById($sourceRecord, $sourceModule);
return $sourceRecordModel->getSelectedIdsList($request->get('parentModule'), $excludedIds);
}
$customViewModel = CustomView_Record_Model::getInstanceById($cvId);
if ($customViewModel) {
$searchKey = $request->get('search_key');
$searchValue = $request->get('search_value');
$operator = $request->get('operator');
if (!empty($operator)) {
$customViewModel->set('operator', $operator);
$customViewModel->set('search_key', $searchKey);
$customViewModel->set('search_value', $searchValue);
}
$customViewModel->set('search_params', $request->get('search_params'));
return $customViewModel->getRecordIds($excludedIds);
}
return array();
}
开发者ID:cin-system,项目名称:cinrepo,代码行数:33,代码来源:ComposeEmail.php
注:本文中的CustomView_Record_Model类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论