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


PHP Vtiger_Module_Model::getInstance方法代码示例

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


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

示例1: 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

示例2: 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

示例3: preProcess

 public function preProcess(Vtiger_Request $request)
 {
     parent::preProcess($request);
     $viewer = $this->getViewer($request);
     $record = $request->get('record');
     $moduleName = $request->getModule();
     $reportModel = Reports_Record_Model::getCleanInstance($record);
     $primaryModule = $reportModel->getPrimaryModule();
     $primaryModuleModel = Vtiger_Module_Model::getInstance($primaryModule);
     if ($primaryModuleModel) {
         $currentUser = Users_Record_Model::getCurrentUserModel();
         $userPrivilegesModel = Users_Privileges_Model::getInstanceById($currentUser->getId());
         $permission = $userPrivilegesModel->hasModulePermission($primaryModuleModel->getId());
         if (!$permission) {
             $viewer->assign('MODULE', $primaryModule);
             $viewer->assign('MESSAGE', 'LBL_PERMISSION_DENIED');
             $viewer->view('OperationNotPermitted.tpl', $primaryModule);
             exit;
         }
     }
     $viewer->assign('REPORT_MODEL', $reportModel);
     $viewer->assign('RECORD_ID', $record);
     $viewer->assign('MODULE', $moduleName);
     $viewer->assign('VIEW', 'ChartEdit');
     $viewer->assign('RECORD_MODE', $request->getMode());
     $viewer->view('EditChartHeader.tpl', $request->getModule());
 }
开发者ID:Bergdahls,项目名称:YetiForceCRM,代码行数:27,代码来源:ChartEdit.php

示例4: 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

示例5: if

<?php if ($_valid && !is_callable('content_56059e5cf22c6')) {function content_56059e5cf22c6($_smarty_tpl) {?><?php if (!is_callable('smarty_modifier_regex_replace')) include '/var/www/kulturedkitsch.info/public_html/vtigercrm/libraries/Smarty/libs/plugins/modifier.regex_replace.php';
?>


<?php $_smarty_tpl->tpl_vars['MODULE'] = new Smarty_variable('PBXManager', null, 0);?>
<?php $_smarty_tpl->tpl_vars['MODULEMODEL'] = new Smarty_variable(Vtiger_Module_Model::getInstance($_smarty_tpl->tpl_vars['MODULE']->value), null, 0);?>
<?php $_smarty_tpl->tpl_vars['FIELD_VALUE'] = new Smarty_variable($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->get('fieldvalue'), null, 0);?>
<?php if ($_smarty_tpl->tpl_vars['MODULEMODEL']->value&&$_smarty_tpl->tpl_vars['MODULEMODEL']->value->isActive()&&$_smarty_tpl->tpl_vars['FIELD_VALUE']->value){?>
    <?php $_smarty_tpl->tpl_vars['PERMISSION'] = new Smarty_variable(PBXManager_Server_Model::checkPermissionForOutgoingCall(), null, 0);?>
    <?php if ($_smarty_tpl->tpl_vars['PERMISSION']->value){?>
        <?php $_smarty_tpl->tpl_vars['PHONE_FIELD_VALUE'] = new Smarty_variable($_smarty_tpl->tpl_vars['FIELD_VALUE']->value, null, 0);?>
        <?php $_smarty_tpl->tpl_vars['PHONE_NUMBER'] = new Smarty_variable(smarty_modifier_regex_replace($_smarty_tpl->tpl_vars['PHONE_FIELD_VALUE']->value,"/[-()\s]/",''), null, 0);?>
        <a class="phoneField" data-value="<?php echo $_smarty_tpl->tpl_vars['PHONE_NUMBER']->value;?>
" record="<?php echo $_smarty_tpl->tpl_vars['RECORD']->value->getId();?>
" onclick="Vtiger_PBXManager_Js.registerPBXOutboundCall('<?php echo $_smarty_tpl->tpl_vars['PHONE_NUMBER']->value;?>
',<?php echo $_smarty_tpl->tpl_vars['RECORD']->value->getId();?>
)"><?php echo $_smarty_tpl->tpl_vars['FIELD_MODEL']->value->get('fieldvalue');?>
</a>
    <?php }else{ ?>
        <?php echo $_smarty_tpl->tpl_vars['FIELD_MODEL']->value->getDisplayValue($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->get('fieldvalue'),$_smarty_tpl->tpl_vars['RECORD']->value->getId(),$_smarty_tpl->tpl_vars['RECORD']->value);?>

    <?php }?>
<?php }else{ ?>
    <?php echo $_smarty_tpl->tpl_vars['FIELD_MODEL']->value->getDisplayValue($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->get('fieldvalue'),$_smarty_tpl->tpl_vars['RECORD']->value->getId(),$_smarty_tpl->tpl_vars['RECORD']->value);?>

<?php }?>
<?php }} ?>
开发者ID:jeremyevans6,项目名称:kulturedTiger-,代码行数:27,代码来源:9976c977e73b6271856d0c7818da279e8a74a215.file.PhoneDetailView.tpl.php

示例6: process

 function process(Vtiger_Request $request)
 {
     $branches = $request->get('branches');
     $filter = $request->get('filter');
     if (empty($branches)) {
         return;
     }
     $viewer = $this->getViewer($request);
     $moduleName = $request->getModule();
     $moduleModel = Vtiger_Module_Model::getInstance($moduleName);
     $treeViewModel = Vtiger_TreeView_Model::getInstance($moduleModel);
     $pagingModel = new Vtiger_Paging_Model();
     $pagingModel->set('limit', 'no_limit');
     $listViewModel = Vtiger_ListView_Model::getInstance($moduleName, $filter);
     $listViewModel->set('search_params', $treeViewModel->getSearchParams($branches));
     $listEntries = $listViewModel->getListViewEntries($pagingModel, true);
     if (count($listEntries) === 0) {
         return;
     }
     $listHeaders = $listViewModel->getListViewHeaders();
     $viewer->assign('ENTRIES', $listEntries);
     $viewer->assign('HEADERS', $listHeaders);
     $viewer->assign('MODULE', $moduleName);
     $viewer->view('TreeRecords.tpl', $moduleName);
 }
开发者ID:nikdejan,项目名称:YetiForceCRM,代码行数:25,代码来源:TreeRecords.php

示例7: preProcess

 function preProcess(Vtiger_Request $request, $display = true)
 {
     parent::preProcess($request, false);
     $viewer = $this->getViewer($request);
     $menuModelsList = Vtiger_Menu_Model::getAll(true);
     $selectedModule = $request->getModule();
     $menuStructure = Vtiger_MenuStructure_Model::getInstanceFromMenuList($menuModelsList, $selectedModule);
     $companyDetails = Vtiger_CompanyDetails_Model::getInstanceById();
     $companyLogo = $companyDetails->getLogo();
     $currentDate = Vtiger_Date_UIType::getDisplayDateValue(date('Y-n-j'));
     $viewer->assign('CURRENTDATE', $currentDate);
     $viewer->assign('MODULE', $selectedModule);
     $viewer->assign('MODULE_NAME', $selectedModule);
     $viewer->assign('QUALIFIED_MODULE', $selectedModule);
     $viewer->assign('PARENT_MODULE', $request->get('parent'));
     $viewer->assign('VIEW', $request->get('view'));
     // Order by pre-defined automation process for QuickCreate.
     uksort($menuModelsList, array('Vtiger_MenuStructure_Model', 'sortMenuItemsByProcess'));
     $viewer->assign('MENUS', $menuModelsList);
     $viewer->assign('MENU_STRUCTURE', $menuStructure);
     $viewer->assign('MENU_SELECTED_MODULENAME', $selectedModule);
     $viewer->assign('MENU_TOPITEMS_LIMIT', $menuStructure->getLimit());
     $viewer->assign('COMPANY_LOGO', $companyLogo);
     $viewer->assign('USER_MODEL', Users_Record_Model::getCurrentUserModel());
     $homeModuleModel = Vtiger_Module_Model::getInstance('Home');
     $viewer->assign('HOME_MODULE_MODEL', $homeModuleModel);
     $viewer->assign('HEADER_LINKS', $this->getHeaderLinks());
     $viewer->assign('ANNOUNCEMENT', $this->getAnnouncement());
     $viewer->assign('SEARCHABLE_MODULES', Vtiger_Module_Model::getSearchableModules());
     if ($display) {
         $this->preProcessDisplay($request);
     }
 }
开发者ID:cannking,项目名称:vtigercrm-debug,代码行数:33,代码来源:Basic.php

示例8: preProcess

 public function preProcess(Vtiger_Request $request)
 {
     date_default_timezone_set('Europe/London');
     // to overcome the pre configuration settings
     // Added to redirect to default module if already installed
     $configFileName = 'config.inc.php';
     if (is_file($configFileName) && filesize($configFileName) > 0) {
         $defaultModule = vglobal('default_module');
         $defaultModuleInstance = Vtiger_Module_Model::getInstance($defaultModule);
         $defaultView = $defaultModuleInstance->getDefaultViewName();
         header('Location:index.php?module=' . $defaultModule . '&view=' . $defaultView);
         exit;
     }
     parent::preProcess($request);
     $viewer = $this->getViewer($request);
     $moduleName = $request->getModule();
     $defaultLanguage = $request->get('lang') ? $request->get('lang') : 'ru_ru';
     vglobal('default_language', $defaultLanguage);
     define('INSTALLATION_MODE', true);
     define('INSTALLATION_MODE_DEBUG', $this->debug);
     // SalesPlatform.ru begin
     $viewer->assign('MODULE_NAME', 'Install');
     // SalesPlatform.ru end
     $viewer->view('InstallPreProcess.tpl', $moduleName);
 }
开发者ID:Wasage,项目名称:werpa,代码行数:25,代码来源:Index.php

示例9: getActivities

 /**
  * Function to get activities
  * @param Vtiger_Request $request
  * @return <List of activity models>
  */
 public function getActivities(Vtiger_Request $request)
 {
     $moduleName = 'Calendar';
     $moduleModel = Vtiger_Module_Model::getInstance($moduleName);
     $currentUserPriviligesModel = Users_Privileges_Model::getCurrentUserPrivilegesModel();
     if ($currentUserPriviligesModel->hasModulePermission($moduleModel->getId())) {
         $moduleName = $request->getModule();
         $recordId = $request->get('record');
         $pageNumber = $request->get('page');
         if (empty($pageNumber)) {
             $pageNumber = 1;
         }
         $pagingModel = new Vtiger_Paging_Model();
         $pagingModel->set('page', $pageNumber);
         $pagingModel->set('limit', 10);
         if (!$this->record) {
             $this->record = Vtiger_DetailView_Model::getInstance($moduleName, $recordId);
         }
         $recordModel = $this->record->getRecord();
         $moduleModel = $recordModel->getModule();
         $relatedActivities = $moduleModel->getCalendarActivities('', $pagingModel, 'all', $recordId);
         $viewer = $this->getViewer($request);
         $viewer->assign('RECORD', $recordModel);
         $viewer->assign('MODULE_NAME', $moduleName);
         $viewer->assign('PAGING_MODEL', $pagingModel);
         $viewer->assign('PAGE_NUMBER', $pageNumber);
         $viewer->assign('ACTIVITIES', $relatedActivities);
         return $viewer->view('RelatedActivities.tpl', $moduleName, true);
     }
 }
开发者ID:cannking,项目名称:vtigercrm-debug,代码行数:35,代码来源:Detail.php

示例10: init

 public function init()
 {
     $moduleModel = Vtiger_Module_Model::getInstance("Workflow2");
     $className = "S" . "WE" . "xt" . "ension_" . "Workflow2_" . "f54fc8d8ea40c20ed7b" . "ded50c0d717b52c263a9f";
     $asdf = new $className("Workflow2", $moduleModel->version);
     $this->fieldSetter = $this->addPreset("FieldSetter", "setter", array('fromModule' => $this->getModuleName(), 'toModule' => $this->getModuleName(), 'refFields' => $asdf->g1dd63e9ab62a68ac02f481ed3ba709207cb145ae() == 'pr' . 'o'));
 }
开发者ID:cin-system,项目名称:cinrepo,代码行数:7,代码来源:WfTaskSetter.php

示例11: preProcess

 public function preProcess(Vtiger_Request $request, $display = true)
 {
     parent::preProcess($request, false);
     $viewer = $this->getViewer($request);
     $moduleName = $request->getModule();
     if (!empty($moduleName)) {
         $moduleModel = Vtiger_Module_Model::getInstance($moduleName);
         $currentUser = Users_Record_Model::getCurrentUserModel();
         $userPrivilegesModel = Users_Privileges_Model::getInstanceById($currentUser->getId());
         $permission = $userPrivilegesModel->hasModulePermission($moduleModel->getId());
         $viewer->assign('MODULE', $moduleName);
         if (!$permission) {
             $viewer->assign('MESSAGE', 'LBL_PERMISSION_DENIED');
             $viewer->view('OperationNotPermitted.tpl', $moduleName);
             exit;
         }
         $linkParams = array('MODULE' => $moduleName, 'ACTION' => $request->get('view'));
         $linkModels = $moduleModel->getSideBarLinks($linkParams);
         $viewer->assign('QUICK_LINKS', $linkModels);
     }
     $viewer->assign('CURRENT_USER_MODEL', Users_Record_Model::getCurrentUserModel());
     $viewer->assign('CURRENT_VIEW', $request->get('view'));
     if ($display) {
         $this->preProcessDisplay($request);
     }
 }
开发者ID:nouphet,项目名称:vtigercrm-6.0.0-ja,代码行数:26,代码来源:Index.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');
     $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

示例13: process

 public function process(Vtiger_Request $request)
 {
     $moduleName = $request->getModule();
     $srecord = $request->get('srecord');
     $smodule = $request->get('smodule');
     $type = $request->get('type');
     $mode = $request->get('mode');
     $record = $request->get('record');
     $module = $request->get('module');
     $currentUser = Users_Record_Model::getCurrentUserModel();
     $recordModel = Vtiger_Record_Model::getCleanInstance($moduleName);
     $recordModel_OSSMailScanner = Vtiger_Record_Model::getCleanInstance('OSSMailScanner');
     $Config = $recordModel_OSSMailScanner->getConfig('email_list');
     $emailModuleModel = Vtiger_Module_Model::getInstance('OSSMail');
     $config = $emailModuleModel->getComposeParameters();
     $urldata = $emailModuleModel->getComposeUrl($smodule, $srecord, 'Detail', $config['popup']);
     $viewer = $this->getViewer($request);
     $viewer->assign('RECOLDLIST', $recordModel->{$mode}($srecord, $smodule, $Config, $type));
     $viewer->assign('SENDURLDDATA', $urldata);
     $viewer->assign('MODULENAME', $moduleName);
     $viewer->assign('SMODULENAME', $smodule);
     $viewer->assign('RECORD', $record);
     $viewer->assign('SRECORD', $srecord);
     $viewer->assign('TYPE', $type);
     $viewer->assign('POPUP', $config['popup']);
     $viewer->view('widgets.tpl', 'OSSMailView');
 }
开发者ID:JeRRimix,项目名称:YetiForceCRM,代码行数:27,代码来源:widget.php

示例14: 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

示例15: preProcess

 function preProcess(Vtiger_Request $request, $display = true)
 {
     parent::preProcess($request, false);
     $viewer = $this->getViewer($request);
     $selectedModule = $request->getModule();
     $companyDetails = Vtiger_CompanyDetails_Model::getInstanceById();
     $companyLogo = $companyDetails->getLogo();
     $currentDate = Vtiger_Date_UIType::getDisplayDateValue(date('Y-n-j'));
     $viewer->assign('CURRENTDATE', $currentDate);
     $viewer->assign('MODULE', $selectedModule);
     $viewer->assign('MODULE_NAME', $selectedModule);
     $viewer->assign('QUALIFIED_MODULE', $selectedModule);
     $viewer->assign('PARENT_MODULE', $request->get('parent'));
     $viewer->assign('MENUS', Vtiger_Menu_Model::getAll(true));
     $viewer->assign('VIEW', $request->get('view'));
     $viewer->assign('COMPANY_LOGO', $companyLogo);
     $viewer->assign('USER_MODEL', Users_Record_Model::getCurrentUserModel());
     $homeModuleModel = Vtiger_Module_Model::getInstance('Home');
     $viewer->assign('HOME_MODULE_MODEL', $homeModuleModel);
     $viewer->assign('HEADER_LINKS', $this->getHeaderLinks());
     $viewer->assign('ANNOUNCEMENT', $this->getAnnouncement());
     $viewer->assign('SEARCHABLE_MODULES', Vtiger_Module_Model::getSearchableModules());
     $viewer->assign('CHAT_ACTIVE', vtlib_isModuleActive('AJAXChat'));
     if ($display) {
         $this->preProcessDisplay($request);
     }
 }
开发者ID:artisan4710,项目名称:YetiForceCRM,代码行数:27,代码来源:Basic.php


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