本文整理汇总了PHP中Vtiger_Widget_Model类的典型用法代码示例。如果您正苦于以下问题:PHP Vtiger_Widget_Model类的具体用法?PHP Vtiger_Widget_Model怎么用?PHP Vtiger_Widget_Model使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Vtiger_Widget_Model类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: process
function process(Vtiger_Request $request)
{
$currentUser = Users_Record_Model::getCurrentUserModel();
$moduleName = $request->getModule();
$componentName = $request->get('name');
$linkId = $request->get('linkid');
$id = $request->get('widgetid');
if (!empty($componentName)) {
$className = Vtiger_Loader::getComponentClassName('Dashboard', $componentName, $moduleName);
if (!empty($className)) {
$widget = NULL;
if (!empty($linkId)) {
$widget = new Vtiger_Widget_Model();
$widget->set('linkid', $linkId);
$widget->set('userid', $currentUser->getId());
$widget->set('widgetid', $id);
$widget->set('active', $request->get('active'));
$widget->set('filterid', $request->get('filterid', NULL));
if ($request->has('data')) {
$widget->set('data', $request->get('data'));
}
$widget->show();
}
$classInstance = new $className();
$classInstance->process($request, $widget);
return;
}
}
$response = new Vtiger_Response();
$response->setResult(array('success' => false, 'message' => vtranslate('NO_DATA')));
$response->emit();
}
开发者ID:rcrrich,项目名称:UpdatePackages,代码行数:32,代码来源:ShowWidget.php
示例2: 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
示例3: 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
示例4: 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
示例5: 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
示例6: 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
示例7: 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
示例8: process
public function process(Vtiger_Request $request)
{
$currentUser = Users_Record_Model::getCurrentUserModel();
$viewer = $this->getViewer($request);
$moduleName = $request->getModule();
$linkId = $request->get('linkid');
//var_dump($request->get('createdtime'));
$kpiHelper = new Vtiger_Kpi_Helper($request);
$data = $kpiHelper->getData($request);
$widget = Vtiger_Widget_Model::getInstance($linkId, $currentUser->getId());
$viewer->assign('KPILIST', $kpiHelper->getKpiList());
$viewer->assign('KPITYPES', $kpiHelper->getKpiTypes());
$viewer->assign('DTYPE', $request->get('type'));
$viewer->assign('DSERVICE', $request->get('service'));
$viewer->assign('DTIME', $request->get('time'));
//$viewer->assign('KPIHELPER', $kpiHelper);
$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/KpiContents.tpl', $moduleName);
} else {
$viewer->view('dashboards/Kpi.tpl', $moduleName);
}
}
开发者ID:rcrrich,项目名称:UpdatePackages,代码行数:28,代码来源:Kpi.php
示例9: getDashboards
/**
* Function returns List of User's selected Dashboard Widgets
* @return <Array of Vtiger_Widget_Model>
*/
public function getDashboards()
{
$db = PearDatabase::getInstance();
$currentUser = Users_Record_Model::getCurrentUserModel();
$moduleModel = $this->getModule();
$sql = " SELECT vtiger_links.*, vtiger_module_dashboard_widgets.userid, vtiger_module_dashboard_widgets.id as widgetid, vtiger_module_dashboard_widgets.position as position, vtiger_links.linkid as id FROM vtiger_links " . " INNER JOIN vtiger_module_dashboard_widgets ON vtiger_links.linkid=vtiger_module_dashboard_widgets.linkid" . " WHERE (vtiger_module_dashboard_widgets.userid = ? AND linktype = ? AND tabid = ?)";
$params = array($currentUser->getId(), 'DASHBOARDWIDGET', $moduleModel->getId());
$result = $db->pquery($sql, $params);
$widgets = array();
for ($i = 0, $len = $db->num_rows($result); $i < $len; $i++) {
$row = $db->query_result_rowdata($result, $i);
$row['linkid'] = $row['id'];
$widgets[] = Vtiger_Widget_Model::getInstanceFromValues($row);
}
foreach ($widgets as $index => $widget) {
$label = $widget->get('linklabel');
if ($label == 'Tag Cloud') {
$isTagCloudExists = getTagCloudView($currentUser->getId());
if ($isTagCloudExists === 'false') {
unset($widgets[$index]);
}
}
}
return $widgets;
}
开发者ID:nouphet,项目名称:vtigercrm-6.0.0-ja,代码行数:29,代码来源:DashBoard.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');
$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
示例11: 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
示例12: 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
示例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)
{
$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
示例15: process
public function process(Vtiger_Request $request, $widget = NULL)
{
$currentUser = Users_Record_Model::getCurrentUserModel();
$viewer = $this->getViewer($request);
$moduleName = $request->getModule();
// Initialize Widget to the right-state of information
if ($widget && !$request->has('widgetid')) {
$widgetId = $widget->get('id');
} else {
$widgetId = $request->get('widgetid');
}
$widget = Vtiger_Widget_Model::getInstanceWithWidgetId($widgetId, $currentUser->getId());
if (!$request->has('owner')) {
$owner = Settings_WidgetsManagement_Module_Model::getDefaultUserId($widget);
} else {
$owner = $request->get('owner');
}
$minilistWidgetModel = new Vtiger_MiniList_Model();
$minilistWidgetModel->setWidgetModel($widget);
$viewer->assign('WIDGET', $widget);
$viewer->assign('MODULE_NAME', $moduleName);
$viewer->assign('USER', $owner);
$viewer->assign('CURRENTUSER', $currentUser);
$viewer->assign('MINILIST_WIDGET_MODEL', $minilistWidgetModel);
$viewer->assign('BASE_MODULE', $minilistWidgetModel->getTargetModule());
$viewer->assign('SCRIPTS', $this->getFooterScripts());
$content = $request->get('content');
if (!empty($content)) {
$viewer->view('dashboards/MiniListContents.tpl', $moduleName);
} else {
$widget->set('title', $minilistWidgetModel->getTitle());
$viewer->view('dashboards/MiniList.tpl', $moduleName);
}
}
开发者ID:rcrrich,项目名称:YetiForceCRM,代码行数:34,代码来源:MiniList.php
示例16: process
public function process(Vtiger_Request $request, $widget = NULL)
{
global $log;
$log->debug("Entering ./dashboards/MiniList.php::process");
$currentUser = Users_Record_Model::getCurrentUserModel();
$viewer = $this->getViewer($request);
$moduleName = $request->getModule();
// Initialize Widget to the right-state of information
if ($widget && !$request->has('widgetid')) {
$widgetId = $widget->get('id');
} else {
$widgetId = $request->get('widgetid');
}
$widget = Vtiger_Widget_Model::getInstanceWithWidgetId($widgetId, $currentUser->getId());
$minilistWidgetModel = new Vtiger_MiniList_Model();
$minilistWidgetModel->setWidgetModel($widget);
$viewer->assign('WIDGET', $widget);
$viewer->assign('MODULE_NAME', $moduleName);
$viewer->assign('MINILIST_WIDGET_MODEL', $minilistWidgetModel);
$viewer->assign('BASE_MODULE', $minilistWidgetModel->getTargetModule());
$viewer->assign('SCRIPTS', $this->getHeaderScripts());
$content = $request->get('content');
if (!empty($content)) {
$viewer->view('dashboards/MiniListContents.tpl', $moduleName);
} else {
$widget->set('title', $minilistWidgetModel->getTitle());
$viewer->view('dashboards/MiniList.tpl', $moduleName);
}
}
开发者ID:cin-system,项目名称:cinrepo,代码行数:29,代码来源:MiniList.php
示例17: 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->getPotentialsCountBySalesPerson();
$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/GroupBySalesPerson.tpl', $moduleName);
}
}
开发者ID:nvh3010,项目名称:quancrm,代码行数:28,代码来源:GroupedBySalesPerson.php
示例18: getSelectableDashboard
public function getSelectableDashboard()
{
global $log;
$log->debug("Entering Settings_WidgetsManagement_Module_Model::getSelectableDashboard() method ...");
$db = PearDatabase::getInstance();
$currentUser = Users_Record_Model::getCurrentUserModel();
$sql = 'SELECT * FROM vtiger_links WHERE linktype = ?';
$params = array('DASHBOARDWIDGET');
$result = $db->pquery($sql, $params);
$widgets = array();
for ($i = 0; $i < $db->num_rows($result); $i++) {
$row = $db->query_result_rowdata($result, $i);
$moduleName = Vtiger_Functions::getModuleName($row['tabid']);
if ($moduleName != 'Home' && ($row['linklabel'] == 'Mini List' || $row['linklabel'] == 'Notebook')) {
continue;
}
if ($row['linklabel'] == 'Tag Cloud') {
$isTagCloudExists = getTagCloudView($currentUser->getId());
if ($isTagCloudExists == 'false') {
continue;
}
}
$moduleName = Vtiger_Functions::getModuleName($row['tabid']);
$widgets[$moduleName][] = Vtiger_Widget_Model::getInstanceFromValues($row);
}
$log->debug("Exiting Settings_WidgetsManagement_Module_Model::getSelectableDashboard() method ...");
return $widgets;
}
开发者ID:rcrrich,项目名称:UpdatePackages,代码行数:28,代码来源:Module.php
示例19: 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
示例20: 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
注:本文中的Vtiger_Widget_Model类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论