當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Vtiger_Widget_Model::getInstance方法代碼示例

本文整理匯總了PHP中Vtiger_Widget_Model::getInstance方法的典型用法代碼示例。如果您正苦於以下問題:PHP Vtiger_Widget_Model::getInstance方法的具體用法?PHP Vtiger_Widget_Model::getInstance怎麽用?PHP Vtiger_Widget_Model::getInstance使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Vtiger_Widget_Model的用法示例。


在下文中一共展示了Vtiger_Widget_Model::getInstance方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: process

 public function process(Vtiger_Request $request)
 {
     $currentUser = Users_Record_Model::getCurrentUserModel();
     $viewer = $this->getViewer($request);
     $moduleName = $request->getModule();
     $page = $request->get('page');
     $linkId = $request->get('linkid');
     $widget = Vtiger_Widget_Model::getInstance($linkId, $currentUser->getId());
     if (!$request->has('owner')) {
         $owner = Settings_WidgetsManagement_Module_Model::getDefaultUserId($widget);
     } else {
         $owner = $request->get('owner');
     }
     $pagingModel = new Vtiger_Paging_Model();
     $pagingModel->set('page', $page);
     $pagingModel->set('limit', (int) $widget->get('limit'));
     $viewer->assign('WIDGET', $widget);
     $viewer->assign('MODULE_NAME', $moduleName);
     $viewer->assign('PAGING', $pagingModel);
     $viewer->assign('CURRENTUSER', $currentUser);
     $title_max_length = vglobal('title_max_length');
     $href_max_length = vglobal('href_max_length');
     $viewer->assign('NAMELENGHT', $title_max_length);
     $viewer->assign('HREFNAMELENGHT', $href_max_length);
     $viewer->assign('NODATAMSGLABLE', 'LBL_NO_SCHEDULED_ACTIVITIES');
     $currentUserModel = Users_Record_Model::getCurrentUserModel();
     $viewer->assign('CURRENT_USER', $currentUserModel);
     $content = $request->get('content');
     if (!empty($content)) {
         $viewer->view('dashboards/CalendarContents.tpl', $moduleName);
     } else {
         $viewer->view('dashboards/Calendar.tpl', $moduleName);
     }
 }
開發者ID:rcrrich,項目名稱:YetiForceCRM,代碼行數:34,代碼來源:Calendar.php

示例2: process

 public function process(Vtiger_Request $request)
 {
     $currentUser = Users_Record_Model::getCurrentUserModel();
     $viewer = $this->getViewer($request);
     $moduleName = $request->getModule();
     $number = $request->get('number');
     $page = $request->get('page');
     $linkId = $request->get('linkid');
     $widget = Vtiger_Widget_Model::getInstance($linkId, $currentUser->getId());
     $limit = (int) $widget->get('limit');
     if (empty($limit)) {
         $limit = 10;
     }
     if (empty($page)) {
         $page = 1;
     }
     $pagingModel = new Vtiger_Paging_Model();
     $pagingModel->set('page', $page);
     $pagingModel->set('limit', $limit);
     $columnList = array('LBL_NAME' => 'label', 'LBL_MODULE_NAME' => 'setype', 'Last Modified By' => 'modifiedtime', 'LBL_OWNER' => 'smownerid');
     $recordList = ListUpdatedRecord::getListRecord(NULL, $columnList);
     $viewer->assign('COLUMN_LIST', $columnList);
     $viewer->assign('WIDGET', $widget);
     $viewer->assign('MODULE_NAME', $moduleName);
     $viewer->assign('LIST', $recordList);
     $viewer->assign('PAGE', $page);
     $viewer->assign('NEXTPAGE', count($recordList) < $limit ? 0 : $page + 1);
     $content = $request->get('content');
     if (!empty($content)) {
         $viewer->view('dashboards/ListUpdatedRecordContents.tpl', $moduleName);
     } else {
         $viewer->view('dashboards/ListUpdatedRecord.tpl', $moduleName);
     }
 }
開發者ID:rcrrich,項目名稱:UpdatePackages,代碼行數:34,代碼來源:ListUpdatedRecord.php

示例3: process

 public function process(Vtiger_Request $request)
 {
     $currentUser = Users_Record_Model::getCurrentUserModel();
     $viewer = $this->getViewer($request);
     $moduleName = $request->getModule();
     $linkId = $request->get('linkid');
     $owner = $request->get('owner');
     $dates = $request->get('expectedclosedate');
     //Date conversion from user to database format
     if (!empty($dates)) {
         $dates['start'] = Vtiger_Date_UIType::getDBInsertedValue($dates['start']);
         $dates['end'] = Vtiger_Date_UIType::getDBInsertedValue($dates['end']);
     }
     $moduleModel = Vtiger_Module_Model::getInstance($moduleName);
     $data = $moduleModel->getPotentialsCountBySalesStage($owner, $dates);
     $widget = Vtiger_Widget_Model::getInstance($linkId, $currentUser->getId());
     $viewer->assign('WIDGET', $widget);
     $viewer->assign('MODULE_NAME', $moduleName);
     $viewer->assign('DATA', $data);
     //Include special script and css needed for this widget
     $viewer->assign('SCRIPTS', $this->getHeaderScripts($request));
     $viewer->assign('STYLES', $this->getHeaderCss($request));
     $viewer->assign('CURRENTUSER', $currentUser);
     $content = $request->get('content');
     if (!empty($content)) {
         $viewer->view('dashboards/DashBoardWidgetContents.tpl', $moduleName);
     } else {
         $viewer->view('dashboards/GroupBySalesStage.tpl', $moduleName);
     }
 }
開發者ID:nouphet,項目名稱:vtigercrm-6.0.0-ja,代碼行數:30,代碼來源:GroupedBySalesStage.php

示例4: process

 public function process(Vtiger_Request $request)
 {
     $LIMIT = 10;
     $currentUser = Users_Record_Model::getCurrentUserModel();
     $viewer = $this->getViewer($request);
     $moduleName = $request->getModule();
     $type = $request->get('type');
     $page = $request->get('page');
     $linkId = $request->get('linkid');
     if (empty($page)) {
         $page = 1;
     }
     $pagingModel = new Vtiger_Paging_Model();
     $pagingModel->set('page', $page);
     $pagingModel->set('limit', $LIMIT);
     $moduleModel = Vtiger_Module_Model::getInstance($moduleName);
     $history = $moduleModel->getHistory($pagingModel, $type);
     $widget = Vtiger_Widget_Model::getInstance($linkId, $currentUser->getId());
     $modCommentsModel = Vtiger_Module_Model::getInstance('ModComments');
     $viewer->assign('WIDGET', $widget);
     $viewer->assign('MODULE_NAME', $moduleName);
     $viewer->assign('HISTORIES', $history);
     $viewer->assign('PAGE', $page);
     $viewer->assign('NEXTPAGE', count($history) < $LIMIT ? 0 : $page + 1);
     $viewer->assign('COMMENTS_MODULE_MODEL', $modCommentsModel);
     $content = $request->get('content');
     if (!empty($content)) {
         $viewer->view('dashboards/HistoryContents.tpl', $moduleName);
     } else {
         $viewer->view('dashboards/History.tpl', $moduleName);
     }
 }
開發者ID:rcrrich,項目名稱:UpdatePackages,代碼行數:32,代碼來源:History.php

示例5: process

 public function process(Vtiger_Request $request)
 {
     $currentUser = Users_Record_Model::getCurrentUserModel();
     $viewer = $this->getViewer($request);
     $moduleName = $request->getModule();
     $linkId = $request->get('linkid');
     $user = $request->get('user');
     $time = $request->get('time');
     $moduleModel = Vtiger_Module_Model::getInstance($moduleName);
     $widget = Vtiger_Widget_Model::getInstance($linkId, $currentUser->getId());
     $data = $moduleModel->getWidgetTimeControl($user, $time);
     $workDays = $moduleModel->getWorkingDays($time['start'], $time['end']);
     $selectedDays = (strtotime($time['end']) - strtotime($time['start'])) / (60 * 60 * 24) + 1;
     $viewer->assign('SELECTEDDAYS', $selectedDays);
     $viewer->assign('WORKDAYS', $workDays);
     $viewer->assign('AVERAGE', $data['average']);
     $viewer->assign('COUNTDAYS', $data['countDays']);
     $viewer->assign('USERID', $user);
     $viewer->assign('DTIME', $time);
     $viewer->assign('DATA', $data['data']);
     $viewer->assign('WIDGET', $widget);
     $viewer->assign('MODULE_NAME', $moduleName);
     $viewer->assign('CURRENTUSER', $currentUser);
     $content = $request->get('content');
     if (!empty($content)) {
         $viewer->view('dashboards/TimeControlContents.tpl', $moduleName);
     } else {
         $viewer->view('dashboards/TimeControl.tpl', $moduleName);
     }
 }
開發者ID:rcrrich,項目名稱:UpdatePackages,代碼行數:30,代碼來源:TimeControl.php

示例6: process

 public function process(Vtiger_Request $request)
 {
     $currentUser = Users_Record_Model::getCurrentUserModel();
     $viewer = $this->getViewer($request);
     $moduleName = $request->getModule();
     $linkId = $request->get('linkid');
     $moduleModel = Vtiger_Module_Model::getInstance($moduleName);
     $data = $moduleModel->getOpenTickets();
     $listViewUrl = $moduleModel->getListViewUrl();
     for ($i = 0; $i < count($data); $i++) {
         $data[$i]["links"] = $listViewUrl . $this->getSearchParams($data[$i][name]);
     }
     $widget = Vtiger_Widget_Model::getInstance($linkId, $currentUser->getId());
     $viewer->assign('WIDGET', $widget);
     $viewer->assign('MODULE_NAME', $moduleName);
     $viewer->assign('DATA', $data);
     //Include special script and css needed for this widget
     $viewer->assign('CURRENTUSER', $currentUser);
     $content = $request->get('content');
     if (!empty($content)) {
         $viewer->view('dashboards/DashBoardWidgetContents.tpl', $moduleName);
     } else {
         $viewer->view('dashboards/OpenTickets.tpl', $moduleName);
     }
 }
開發者ID:cannking,項目名稱:vtigercrm-debug,代碼行數:25,代碼來源:OpenTickets.php

示例7: process

 public function process(Vtiger_Request $request)
 {
     $currentUser = Users_Record_Model::getCurrentUserModel();
     $viewer = $this->getViewer($request);
     $moduleName = $request->getModule();
     $linkId = $request->get('linkid');
     $data = $request->get('data');
     $createdTime = $request->get('createdtime');
     //Date conversion from user to database format
     if (!empty($createdTime)) {
         $dates['start'] = Vtiger_Date_UIType::getDBInsertedValue($createdTime['start']);
         $dates['end'] = Vtiger_Date_UIType::getDBInsertedValue($createdTime['end']);
     }
     $moduleModel = Vtiger_Module_Model::getInstance($moduleName);
     $data = $moduleModel->getCountriesByRating($request->get('owner'), $dates);
     $listViewUrl = $moduleModel->getListViewUrl();
     for ($i = 0; $i < count($data); $i++) {
         $data[$i]["links"] = $listViewUrl . $this->getSearchParams($data[$i][2], $request->get('owner'), $dates);
     }
     $widget = Vtiger_Widget_Model::getInstance($linkId, $currentUser->getId());
     //Include special script and css needed for this widget
     $viewer->assign('WIDGET', $widget);
     $viewer->assign('MODULE_NAME', $moduleName);
     $viewer->assign('DATA', $data);
     $viewer->assign('CURRENTUSER', $currentUser);
     $accessibleUsers = $currentUser->getAccessibleUsersForModule($moduleName);
     $viewer->assign('ACCESSIBLE_USERS', $accessibleUsers);
     $content = $request->get('content');
     if (!empty($content)) {
         $viewer->view('dashboards/DashBoardWidgetContents.tpl', $moduleName);
     } else {
         $viewer->view('dashboards/CountriesByRating.tpl', $moduleName);
     }
 }
開發者ID:andreadanzi,項目名稱:sws,代碼行數:34,代碼來源:CountriesByRating.php

示例8: process

 public function process(Vtiger_Request $request)
 {
     $currentUser = Users_Record_Model::getCurrentUserModel();
     $viewer = $this->getViewer($request);
     $moduleName = $request->getModule();
     $page = $request->get('page');
     $linkId = $request->get('linkid');
     $widget = Vtiger_Widget_Model::getInstance($linkId, $currentUser->getId());
     if (!$request->has('owner')) {
         $owner = Settings_WidgetsManagement_Module_Model::getDefaultUserId($widget);
     } else {
         $owner = $request->get('owner');
     }
     $pagingModel = new Vtiger_Paging_Model();
     $pagingModel->set('page', $page);
     $pagingModel->set('limit', (int) $widget->get('limit'));
     $moduleModel = Vtiger_Module_Model::getInstance($moduleName);
     $projectsTasks = $owner === false ? array() : $moduleModel->getAssignedProjectsTasks('upcoming', $pagingModel, $owner);
     $viewer->assign('WIDGET', $widget);
     $viewer->assign('MODULE_NAME', $moduleName);
     $viewer->assign('PROJECTSTASKS', $projectsTasks);
     $viewer->assign('PAGING', $pagingModel);
     $viewer->assign('CURRENTUSER', $currentUser);
     global $title_max_length, $href_max_length;
     $viewer->assign('NAMELENGHT', $title_max_length);
     $viewer->assign('HREFNAMELENGHT', $href_max_length);
     $viewer->assign('NODATAMSGLABLE', 'LBL_NO_OVERDUE_ACTIVITIES');
     $content = $request->get('content');
     if (!empty($content)) {
         $viewer->view('dashboards/AssignedProjectsTasksContents.tpl', $moduleName);
     } else {
         $viewer->view('dashboards/AssignedProjectsTasks.tpl', $moduleName);
     }
 }
開發者ID:rcrrich,項目名稱:UpdatePackages,代碼行數:34,代碼來源:AssignedOverdueProjectsTasks.php

示例9: process

 public function process(Vtiger_Request $request)
 {
     $currentUser = Users_Record_Model::getCurrentUserModel();
     $viewer = $this->getViewer($request);
     $moduleName = $request->getModule();
     $linkId = $request->get('linkid');
     $moduleModel = Vtiger_Module_Model::getInstance($moduleName);
     $data = $moduleModel->getPotentialTotalAmountBySalesStage();
     $listViewUrl = $moduleModel->getListViewUrl();
     for ($i = 0; $i < count($data); $i++) {
         $data[$i]["links"] = $listViewUrl . $this->getSearchParams($data[$i][1]);
     }
     $widget = Vtiger_Widget_Model::getInstance($linkId, $currentUser->getId());
     $viewer->assign('WIDGET', $widget);
     $viewer->assign('MODULE_NAME', $moduleName);
     $viewer->assign('DATA', $data);
     $viewer->assign('STYLES', $this->getHeaderCss($request));
     $viewer->assign('CURRENTUSER', $currentUser);
     $content = $request->get('content');
     if (!empty($content)) {
         $viewer->view('dashboards/DashBoardWidgetContents.tpl', $moduleName);
     } else {
         $viewer->view('dashboards/FunnelAmount.tpl', $moduleName);
     }
 }
開發者ID:cannking,項目名稱:vtigercrm-debug,代碼行數:25,代碼來源:FunnelAmount.php

示例10: process

 public function process(Vtiger_Request $request)
 {
     $currentUser = Users_Record_Model::getCurrentUserModel();
     $viewer = $this->getViewer($request);
     $moduleName = $request->getModule();
     $linkId = $request->get('linkid');
     $owner = $request->get('owner');
     $dates = $request->get('expectedclosedate');
     //Date conversion from user to database format
     if (!empty($dates)) {
         $dates['start'] = Vtiger_Date_UIType::getDBInsertedValue($dates['start']);
         $dates['end'] = Vtiger_Date_UIType::getDBInsertedValue($dates['end']);
     }
     $moduleModel = Vtiger_Module_Model::getInstance($moduleName);
     $data = $moduleModel->getCampaignsWidget($owner, $dates);
     $listViewUrl = $moduleModel->getListViewUrl();
     for ($i = 0; $i < count($data); $i++) {
         $data[$i][] = $listViewUrl . $this->getSearchParams($data[$i][0], $owner, $dates);
     }
     $widget = Vtiger_Widget_Model::getInstance($linkId, $currentUser->getId());
     $viewer->assign('WIDGET', $widget);
     $viewer->assign('MODULE_NAME', $moduleName);
     $viewer->assign('DATA', $data);
     //Include special script and css needed for this widget
     $viewer->assign('STYLES', $this->getHeaderCss($request));
     $viewer->assign('CURRENTUSER', $currentUser);
     $content = $request->get('content');
     if (!empty($content)) {
         $viewer->view('dashboards/CampaignsWidget.tpl', $moduleName);
     } else {
         $viewer->view('dashboards/CampaignsWidget.tpl', $moduleName);
     }
 }
開發者ID:yozhi,項目名稱:YetiForceCRM,代碼行數:33,代碼來源:CampaignsWidget.php

示例11: process

 public function process(Vtiger_Request $request)
 {
     $currentUser = Users_Record_Model::getCurrentUserModel();
     $moduleName = $request->getModule();
     $page = $request->get('page');
     $linkId = $request->get('linkid');
     $pagingModel = new Vtiger_Paging_Model();
     $pagingModel->set('page', $page);
     $pagingModel->set('limit', 10);
     $user = $request->get('type');
     $moduleModel = Vtiger_Module_Model::getInstance($moduleName);
     $overDueActivities = $moduleModel->getCalendarActivities('overdue', $pagingModel, $user);
     $widget = Vtiger_Widget_Model::getInstance($linkId, $currentUser->getId());
     $viewer = $this->getViewer($request);
     $viewer->assign('WIDGET', $widget);
     $viewer->assign('MODULE_NAME', $moduleName);
     $viewer->assign('ACTIVITIES', $overDueActivities);
     $viewer->assign('PAGING', $pagingModel);
     $viewer->assign('CURRENTUSER', $currentUser);
     $content = $request->get('content');
     if (!empty($content)) {
         $viewer->view('dashboards/CalendarActivitiesContents.tpl', $moduleName);
     } else {
         $viewer->view('dashboards/CalendarActivities.tpl', $moduleName);
     }
 }
開發者ID:cannking,項目名稱:vtigercrm-debug,代碼行數:26,代碼來源:OverdueActivities.php

示例12: process

 public function process(Vtiger_Request $request)
 {
     $currentUser = Users_Record_Model::getCurrentUserModel();
     $viewer = $this->getViewer($request);
     $moduleName = $request->getModule();
     $linkId = $request->get('linkid');
     $expectedclosedate = $request->get('expectedclosedate');
     //Date conversion from user to database format
     if (!empty($expectedclosedate)) {
         $closingdates['start'] = Vtiger_Date_UIType::getDBInsertedValue($expectedclosedate['start']);
         $closingdates['end'] = Vtiger_Date_UIType::getDBInsertedValue($expectedclosedate['end']);
     }
     $createdTime = $request->get('createdtime');
     //Date conversion from user to database format
     if (!empty($createdTime)) {
         $dates['start'] = Vtiger_Date_UIType::getDBInsertedValue($createdTime['start']);
         $dates['end'] = Vtiger_Date_UIType::getDBInsertedValue($createdTime['end']);
     }
     $moduleModel = Vtiger_Module_Model::getInstance($moduleName);
     $data = $moduleModel->getForecast($closingdates, $dates);
     $widget = Vtiger_Widget_Model::getInstance($linkId, $currentUser->getId());
     //Include special script and css needed for this widget
     $viewer->assign('SCRIPTS', $this->getHeaderScripts($request));
     $viewer->assign('WIDGET', $widget);
     $viewer->assign('MODULE_NAME', $moduleName);
     $viewer->assign('DATA', $data);
     $content = $request->get('content');
     if (!empty($content)) {
         $viewer->view('dashboards/DashBoardWidgetContents.tpl', $moduleName);
     } else {
         $viewer->view('dashboards/Forecast.tpl', $moduleName);
     }
 }
開發者ID:cannking,項目名稱:vtigercrm-debug,代碼行數:33,代碼來源:Forecast.php

示例13: process

 public function process(Vtiger_Request $request)
 {
     $currentUser = Users_Record_Model::getCurrentUserModel();
     $viewer = $this->getViewer($request);
     $moduleName = $request->getModule();
     $linkId = $request->get('linkid');
     $createdTime = $request->get('createdtime');
     $owner = $request->get('owner');
     //Date conversion from user to database format
     if (!empty($createdTime)) {
         $dates['start'] = Vtiger_Date_UIType::getDBInsertedValue($createdTime['start']);
         $dates['end'] = Vtiger_Date_UIType::getDBInsertedValue($createdTime['end']);
     }
     $moduleModel = Vtiger_Module_Model::getInstance($moduleName);
     $data = $moduleModel->getLeadsCreated($owner, $dates);
     $widget = Vtiger_Widget_Model::getInstance($linkId, $currentUser->getId());
     //Include special script and css needed for this widget
     $viewer->assign('SCRIPTS', $this->getHeaderScripts($request));
     $viewer->assign('WIDGET', $widget);
     $viewer->assign('MODULE_NAME', $moduleName);
     $viewer->assign('DATA', $data);
     $viewer->assign('CURRENTUSER', $currentUser);
     $accessibleUsers = $currentUser->getAccessibleUsersForModule('Leads');
     $viewer->assign('ACCESSIBLE_USERS', $accessibleUsers);
     $content = $request->get('content');
     if (!empty($content)) {
         $viewer->view('dashboards/DashBoardWidgetContents.tpl', $moduleName);
     } else {
         $viewer->view('dashboards/LeadsCreated.tpl', $moduleName);
     }
 }
開發者ID:Bergdahls,項目名稱:YetiForceCRM,代碼行數:31,代碼來源:LeadsCreated.php

示例14: process

	public function process(Vtiger_Request $request)
	{
		$currentUser = Users_Record_Model::getCurrentUserModel();
		$viewer = $this->getViewer($request);
		$moduleName = $request->getModule();

		$stateActivityLabels = Calendar_Module_Model::getComponentActivityStateLabel();

		$page = $request->get('page');
		$linkId = $request->get('linkid');
		$sortOrder = $request->get('sortorder');
		$orderBy = $request->get('orderby');
		$params = ['status' => $stateActivityLabels['in_realization']];
		if ($request->get('switchParams')) {
			$params = ['status' => $request->get('switchParams')];
		}

		$widget = Vtiger_Widget_Model::getInstance($linkId, $currentUser->getId());
		if (!$request->has('owner'))
			$owner = Settings_WidgetsManagement_Module_Model::getDefaultUserId($widget);
		else
			$owner = $request->get('owner');

		$pagingModel = new Vtiger_Paging_Model();
		$pagingModel->set('page', $page);
		$pagingModel->set('limit', (int) $widget->get('limit'));
		$pagingModel->set('orderby', $orderBy);
		$pagingModel->set('sortorder', $sortOrder);

		$moduleModel = Vtiger_Module_Model::getInstance($moduleName);
		$calendarActivities = ($owner === false) ? array() : $moduleModel->getCalendarActivities('upcoming', $pagingModel, $owner, false, $params);

		$switchLabels = [];
		$switchLabels[] = ['label' => vtranslate($stateActivityLabels['in_realization'], 'Calendar'), 'name' => $stateActivityLabels['in_realization']];
		$switchLabels[] = ['label' => vtranslate($stateActivityLabels['not_started'], 'Calendar'), 'name' => $stateActivityLabels['not_started']];

		$msgLabel = 'LBL_NO_SCHEDULED_ACTIVITIES';
		if ($params['status'] == $stateActivityLabels['in_realization']) {
			$msgLabel = 'LBL_NO_CURRENT_ACTIVITIES';
		}
		$viewer->assign('WIDGET', $widget);
		$viewer->assign('MODULE_NAME', $moduleName);
		$viewer->assign('ACTIVITIES', $calendarActivities);
		$viewer->assign('PAGING', $pagingModel);
		$viewer->assign('CURRENTUSER', $currentUser);
		$title_max_length = vglobal('title_max_length');
		$href_max_length = vglobal('href_max_length');
		$viewer->assign('NAMELENGHT', $title_max_length);
		$viewer->assign('OWNER', $owner);
		$viewer->assign('HREFNAMELENGHT', $href_max_length);
		$viewer->assign('NODATAMSGLABLE', $msgLabel);
		$viewer->assign('SWITCH', $switchLabels);
		$viewer->assign('LISTVIEWLINKS', true);
		$content = $request->get('content');
		if (!empty($content)) {
			$viewer->view('dashboards/CalendarActivitiesContents.tpl', $moduleName);
		} else {
			$viewer->view('dashboards/CalendarActivities.tpl', $moduleName);
		}
	}
開發者ID:rubichcube,項目名稱:YetiForceCRM,代碼行數:60,代碼來源:CalendarActivities.php

示例15: process

 public function process(Vtiger_Request $request)
 {
     $currentUser = Users_Record_Model::getCurrentUserModel();
     $viewer = $this->getViewer($request);
     $moduleName = $request->getModule();
     $linkId = $request->get('linkid');
     $page = $request->get('page');
     if (empty($page)) {
         $page = 1;
     }
     $pagingModel = new Vtiger_Paging_Model();
     $pagingModel->set('page', $page);
     $moduleModel = Vtiger_Module_Model::getInstance($moduleName);
     $models = $moduleModel->getTopPotentials($pagingModel);
     $moduleHeader = $moduleModel->getTopPotentialsHeader();
     $widget = Vtiger_Widget_Model::getInstance($linkId, $currentUser->getId());
     $viewer->assign('WIDGET', $widget);
     $viewer->assign('MODULE_NAME', $moduleName);
     $viewer->assign('MODULE_HEADER', $moduleHeader);
     $viewer->assign('MODELS', $models);
     $content = $request->get('content');
     if (!empty($content)) {
         $viewer->view('dashboards/TopPotentialsContents.tpl', $moduleName);
     } else {
         $viewer->view('dashboards/TopPotentials.tpl', $moduleName);
     }
 }
開發者ID:Bergdahls,項目名稱:YetiForceCRM,代碼行數:27,代碼來源:TopPotentials.php


注:本文中的Vtiger_Widget_Model::getInstance方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。