本文整理汇总了PHP中Vtiger_RecordStructure_Model::getInstanceForModule方法的典型用法代码示例。如果您正苦于以下问题:PHP Vtiger_RecordStructure_Model::getInstanceForModule方法的具体用法?PHP Vtiger_RecordStructure_Model::getInstanceForModule怎么用?PHP Vtiger_RecordStructure_Model::getInstanceForModule使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Vtiger_RecordStructure_Model
的用法示例。
在下文中一共展示了Vtiger_RecordStructure_Model::getInstanceForModule方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getStructure
/**
* Function to get the values in stuctured format
* @return <array> - values in structure array('block'=>array(fieldinfo));
*/
public function getStructure($moduleName)
{
if (!empty($this->structuredValues[$moduleName])) {
return $this->structuredValues[$moduleName];
}
$moduleModel = Vtiger_Module_Model::getInstance($moduleName);
if ($moduleName === 'Emails') {
$restrictedTablesList = array('vtiger_emaildetails', 'vtiger_attachments');
$moduleRecordStructure = array();
$blockModelList = $moduleModel->getBlocks();
foreach ($blockModelList as $blockLabel => $blockModel) {
$fieldModelList = $blockModel->getFields();
if (!empty($fieldModelList)) {
$moduleRecordStructure[$blockLabel] = array();
foreach ($fieldModelList as $fieldName => $fieldModel) {
if (!in_array($fieldModel->get('table'), $restrictedTablesList) && $fieldModel->isViewable()) {
$moduleRecordStructure[$blockLabel][$fieldName] = $fieldModel;
}
}
}
}
} else {
$recordStructureInstance = Vtiger_RecordStructure_Model::getInstanceForModule($moduleModel);
$moduleRecordStructure = $recordStructureInstance->getStructure();
}
$this->structuredValues[$moduleName] = $moduleRecordStructure;
return $moduleRecordStructure;
}
示例2: initializeListViewContents
public function initializeListViewContents(Vtiger_Request $request, Vtiger_Viewer $viewer)
{
$moduleName = $request->get('for_module');
$cvId = $request->get('viewname');
$pageNumber = $request->get('page');
$orderBy = $request->get('orderby');
$sortOrder = $request->get('sortorder');
if (empty($orderBy) && empty($sortOrder)) {
$moduleInstance = CRMEntity::getInstance($moduleName);
$orderBy = $moduleInstance->default_order_by;
$sortOrder = $moduleInstance->default_sort_order;
}
if ($sortOrder == "ASC") {
$nextSortOrder = "DESC";
$sortImage = "downArrowSmall.png";
} else {
$nextSortOrder = "ASC";
$sortImage = "upArrowSmall.png";
}
if (empty($pageNumber)) {
$pageNumber = '1';
}
$moduleModel = Vtiger_Module_Model::getInstance($moduleName);
$listViewModel = Import_ListView_Model::getInstance($moduleName, $cvId);
$recordStructureInstance = Vtiger_RecordStructure_Model::getInstanceForModule($moduleModel);
$pagingModel = new Vtiger_Paging_Model();
$pagingModel->set('page', $pageNumber);
if (!empty($orderBy)) {
$listViewModel->set('orderby', $orderBy);
$listViewModel->set('sortorder', $sortOrder);
}
if (!$this->listViewHeaders) {
$this->listViewHeaders = $listViewModel->getListViewHeaders();
}
if (!$this->listViewEntries) {
$this->listViewEntries = $listViewModel->getListViewEntries($pagingModel);
}
$noOfEntries = count($this->listViewEntries);
$viewer->assign('MODULE', $moduleName);
$viewer->assign('PAGING_MODEL', $pagingModel);
$viewer->assign('PAGE_NUMBER', $pageNumber);
$viewer->assign('RECORD_STRUCTURE_MODEL', $recordStructureInstance);
$viewer->assign('RECORD_STRUCTURE', $recordStructureInstance->getStructure());
$viewer->assign('ORDER_BY', $orderBy);
$viewer->assign('SORT_ORDER', $sortOrder);
$viewer->assign('NEXT_SORT_ORDER', $nextSortOrder);
$viewer->assign('SORT_IMAGE', $sortImage);
$viewer->assign('COLUMN_NAME', $orderBy);
$viewer->assign('LISTVIEW_ENTRIES_COUNT', $noOfEntries);
$viewer->assign('LISTVIEW_HEADERS', $this->listViewHeaders);
$viewer->assign('LISTVIEW_ENTRIES', $this->listViewEntries);
$viewer->assign('CURRENT_USER_MODEL', Users_Record_Model::getCurrentUserModel());
}
示例3: 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);
}
示例4: 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);
}
示例5: step
public function step($step, Vtiger_Request $request)
{
$viewer = $this->getViewer($request);
$moduleName = $request->getModule();
$qualifiedModuleName = $request->getModule(false);
$recordId = $request->get('record');
if ($recordId) {
$moduleInstance = Settings_MappedFields_Module_Model::getInstanceById($recordId);
$viewer->assign('RECORDID', $recordId);
$viewer->assign('MODE', 'edit');
} else {
$moduleInstance = Settings_MappedFields_Module_Model::getCleanInstance();
}
$viewer->assign('MAPPEDFIELDS_MODULE_MODEL', $moduleInstance);
$allModules = Settings_MappedFields_Module_Model::getSupportedModules();
$viewer->assign('ALL_MODULES', $allModules);
$viewer->assign('MODULE', $moduleName);
$viewer->assign('QUALIFIED_MODULE', $qualifiedModuleName);
switch ($step) {
case 'step4':
$viewer->view('Step4.tpl', $qualifiedModuleName);
break;
case 'step3':
$moduleSourceName = Vtiger_Functions::getModuleName($moduleInstance->get('tabid'));
$moduleModel = Vtiger_Module_Model::getInstance($moduleSourceName);
$recordStructureInstance = Vtiger_RecordStructure_Model::getInstanceForModule($moduleModel);
$viewer->assign('RECORD_STRUCTURE', $recordStructureInstance->getStructure());
$viewer->assign('SOURCE_MODULE', $moduleSourceName);
$viewer->assign('ADVANCE_CRITERIA', Vtiger_AdvancedFilter_Helper::transformToAdvancedFilterCondition($moduleInstance->get('conditions')));
$viewer->view('Step3.tpl', $qualifiedModuleName);
break;
case 'step2':
$currentUser = Users_Record_Model::getCurrentUserModel();
$assignedToValues = [];
$assignedToValues['LBL_USERS'] = $currentUser->getAccessibleUsers();
$assignedToValues['LBL_GROUPS'] = $currentUser->getAccessibleGroups();
$viewer->assign('SEL_MODULE_MODEL', Settings_MappedFields_Module_Model::getInstance($moduleInstance->get('tabid')));
$viewer->assign('REL_MODULE_MODEL', Settings_MappedFields_Module_Model::getInstance($moduleInstance->get('reltabid')));
$viewer->assign('USERS_LIST', $assignedToValues);
$viewer->view('Step2.tpl', $qualifiedModuleName);
break;
case 'step1':
default:
$viewer->view('Step1.tpl', $qualifiedModuleName);
break;
}
}
示例6: showMassEditForm
/**
* Function returns the mass edit form
* @param Vtiger_Request $request
*/
function showMassEditForm(Vtiger_Request $request)
{
global $log;
$log->debug("Entering ./views/MassActionAjax.php::showMassEditForm");
$moduleName = $request->getModule();
$cvId = $request->get('viewname');
$selectedIds = $request->get('selected_ids');
$excludedIds = $request->get('excluded_ids');
$viewer = $this->getViewer($request);
$moduleModel = Vtiger_Module_Model::getInstance($moduleName);
$recordStructureInstance = Vtiger_RecordStructure_Model::getInstanceForModule($moduleModel, Vtiger_RecordStructure_Model::RECORD_STRUCTURE_MODE_MASSEDIT);
$fieldInfo = array();
$fieldList = $moduleModel->getFields();
foreach ($fieldList as $fieldName => $fieldModel) {
$fieldInfo[$fieldName] = $fieldModel->getFieldInfo();
}
$picklistDependencyDatasource = Vtiger_DependencyPicklist::getPicklistDependencyDatasource($moduleName);
$viewer->assign('PICKIST_DEPENDENCY_DATASOURCE', Zend_Json::encode($picklistDependencyDatasource));
$viewer->assign('CURRENTDATE', date('Y-n-j'));
$viewer->assign('MODE', 'massedit');
$viewer->assign('MODULE', $moduleName);
$viewer->assign('CVID', $cvId);
$viewer->assign('SELECTED_IDS', $selectedIds);
$viewer->assign('EXCLUDED_IDS', $excludedIds);
$viewer->assign('RECORD_STRUCTURE_MODEL', $recordStructureInstance);
$viewer->assign('MODULE_MODEL', $moduleModel);
$viewer->assign('MASS_EDIT_FIELD_DETAILS', $fieldInfo);
$viewer->assign('RECORD_STRUCTURE', $recordStructureInstance->getStructure());
$viewer->assign('USER_MODEL', Users_Record_Model::getCurrentUserModel());
$viewer->assign('MODULE_MODEL', $moduleModel);
$searchKey = $request->get('search_key');
$searchValue = $request->get('search_value');
$operator = $request->get('operator');
if (!empty($operator)) {
$viewer->assign('OPERATOR', $operator);
$viewer->assign('ALPHABET_VALUE', $searchValue);
$viewer->assign('SEARCH_KEY', $searchKey);
}
$searchParams = $request->get('search_params');
if (!empty($searchParams)) {
$viewer->assign('SEARCH_PARAMS', $searchParams);
}
echo $viewer->view('MassEditForm.tpl', $moduleName, true);
}
示例7: 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);
}
示例8: initializeListViewContents
public function initializeListViewContents(Vtiger_Request $request, Vtiger_Viewer $viewer)
{
$moduleName = $this->getModule($request);
$cvId = $request->get('cvid');
$pageNumber = $request->get('page');
$orderBy = $request->get('orderby');
$sortOrder = $request->get('sortorder');
$sourceModule = $request->get('src_module');
$sourceField = $request->get('src_field');
$sourceRecord = $request->get('src_record');
$searchKey = $request->get('search_key');
$searchValue = $request->get('search_value');
$currencyId = $request->get('currency_id');
$relatedParentModule = $request->get('related_parent_module');
$relatedParentId = $request->get('related_parent_id');
//To handle special operation when selecting record from Popup
$getUrl = $request->get('get_url');
//Check whether the request is in multi select mode
$multiSelectMode = $request->get('multi_select');
if (empty($multiSelectMode)) {
$multiSelectMode = false;
}
if (empty($cvId)) {
$cvId = '0';
}
if (empty($pageNumber)) {
$pageNumber = '1';
}
$pagingModel = new Vtiger_Paging_Model();
$pagingModel->set('page', $pageNumber);
if (vglobal('popupAjax')) {
$pagingModel->set('noLimit', true);
}
$moduleModel = Vtiger_Module_Model::getInstance($moduleName);
$recordStructureInstance = Vtiger_RecordStructure_Model::getInstanceForModule($moduleModel);
$isRecordExists = Vtiger_Util_Helper::checkRecordExistance($relatedParentId);
if ($isRecordExists) {
$relatedParentModule = '';
$relatedParentId = '';
} else {
if ($isRecordExists === NULL) {
$relatedParentModule = '';
$relatedParentId = '';
}
}
if (!empty($relatedParentModule) && !empty($relatedParentId)) {
$parentRecordModel = Vtiger_Record_Model::getInstanceById($relatedParentId, $relatedParentModule);
$listViewModel = Vtiger_RelationListView_Model::getInstance($parentRecordModel, $moduleName, $label);
} else {
$listViewModel = Vtiger_ListView_Model::getInstanceForPopup($moduleName, $sourceModule);
}
if (empty($orderBy) && empty($sortOrder)) {
$moduleInstance = CRMEntity::getInstance($moduleName);
$orderBy = $moduleInstance->default_order_by;
$sortOrder = $moduleInstance->default_sort_order;
}
if (!empty($orderBy)) {
$listViewModel->set('orderby', $orderBy);
$listViewModel->set('sortorder', $sortOrder);
}
if (!empty($sourceModule)) {
$listViewModel->set('src_module', $sourceModule);
$listViewModel->set('src_field', $sourceField);
$listViewModel->set('src_record', $sourceRecord);
}
if (!empty($searchKey) && !empty($searchValue)) {
$listViewModel->set('search_key', $searchKey);
$listViewModel->set('search_value', $searchValue);
}
$searchParmams = $request->get('search_params');
if (empty($searchParmams)) {
$searchParmams = array();
}
$transformedSearchParams = Vtiger_Util_Helper::transferListSearchParamsToFilterCondition($searchParmams, $moduleModel);
$listViewModel->set('search_params', $transformedSearchParams);
//To make smarty to get the details easily accesible
foreach ($searchParmams as $fieldListGroup) {
foreach ($fieldListGroup as $fieldSearchInfo) {
$fieldSearchInfo['searchValue'] = $fieldSearchInfo[2];
$fieldSearchInfo['fieldName'] = $fieldName = $fieldSearchInfo[0];
$searchParmams[$fieldName] = $fieldSearchInfo;
}
}
if (!empty($relatedParentModule) && !empty($relatedParentId)) {
$this->listViewHeaders = $listViewModel->getHeaders();
$models = $listViewModel->getEntries($pagingModel);
$noOfEntries = count($models);
foreach ($models as $recordId => $recordModel) {
foreach ($this->listViewHeaders as $fieldName => $fieldModel) {
$recordModel->set($fieldName, $recordModel->getDisplayValue($fieldName));
}
$models[$recordId] = $recordModel;
}
$this->listViewEntries = $models;
if (count($this->listViewEntries) > 0) {
$parent_related_records = true;
}
} else {
$this->listViewHeaders = $listViewModel->getListViewHeaders();
$this->listViewEntries = $listViewModel->getListViewEntries($pagingModel);
//.........这里部分代码省略.........
示例9: initializeListViewContents
public function initializeListViewContents(Vtiger_Request $request, Vtiger_Viewer $viewer)
{
//src_module value is added to just to stop showing inactive products
$request->set('src_module', $request->getModule());
$moduleName = $this->getModule($request);
$cvId = $request->get('cvid');
$pageNumber = $request->get('page');
$orderBy = $request->get('orderby');
$sortOrder = $request->get('sortorder');
$sourceModule = $request->get('src_module');
$sourceField = $request->get('src_field');
$sourceRecord = $request->get('src_record');
$searchKey = $request->get('search_key');
$searchValue = $request->get('search_value');
$currencyId = $request->get('currency_id');
$potentialId = $request->get('potentialid');
$searchParams = $request->get('search_params');
//To handle special operation when selecting record from Popup
$getUrl = $request->get('get_url');
//Check whether the request is in multi select mode
$multiSelectMode = $request->get('multi_select');
if (empty($multiSelectMode)) {
$multiSelectMode = false;
}
if (empty($cvId)) {
$cvId = '0';
}
if (empty($pageNumber)) {
$pageNumber = '1';
}
$pagingModel = new Vtiger_Paging_Model();
$pagingModel->set('page', $pageNumber);
$moduleModel = Vtiger_Module_Model::getInstance($moduleName);
$listViewModel = Vtiger_ListView_Model::getInstanceForPopup($moduleName, $sourceModule);
$recordStructureInstance = Vtiger_RecordStructure_Model::getInstanceForModule($moduleModel);
if (empty($orderBy) && empty($sortOrder)) {
$moduleInstance = CRMEntity::getInstance($moduleName);
$orderBy = $moduleInstance->default_order_by;
$sortOrder = $moduleInstance->default_sort_order;
}
if (!empty($orderBy)) {
$listViewModel->set('orderby', $orderBy);
$listViewModel->set('sortorder', $sortOrder);
}
if (!empty($sourceModule)) {
$listViewModel->set('src_module', $sourceModule);
$listViewModel->set('src_field', $sourceField);
$listViewModel->set('src_record', $sourceRecord);
}
if (!empty($searchKey) && !empty($searchValue)) {
$listViewModel->set('search_key', $searchKey);
$listViewModel->set('search_value', $searchValue);
}
$searchParmams = $request->get('search_params');
if (empty($searchParmams)) {
$searchParmams = array();
}
$transformedSearchParams = Vtiger_Util_Helper::transferListSearchParamsToFilterCondition($searchParmams, $moduleModel);
$listViewModel->set('search_params', $transformedSearchParams);
//To make smarty to get the details easily accesible
foreach ($searchParmams as $fieldListGroup) {
foreach ($fieldListGroup as $fieldSearchInfo) {
$fieldSearchInfo['searchValue'] = $fieldSearchInfo[2];
$fieldSearchInfo['fieldName'] = $fieldName = $fieldSearchInfo[0];
$searchParmams[$fieldName] = $fieldSearchInfo;
}
}
if (Settings_SalesProcesses_Module_Model::checkRelatedToPotentialsLimit() && Settings_SalesProcesses_Module_Model::isLimitForModule($sourceModule)) {
if ($potentialId == '') {
$potentialId = -1;
}
$listViewModel->set('potential_id', $potentialId);
$viewer->assign('INVENTORY_LIMITED_FROM_POTENTIALS', true);
}
$productModel = Vtiger_Module_Model::getInstance('Products');
if (!$this->listViewHeaders) {
$this->listViewHeaders = $listViewModel->getListViewHeaders();
}
if (!$this->listViewEntries && $productModel->isActive()) {
$this->listViewEntries = $listViewModel->getListViewEntries($pagingModel);
}
if (!$productModel->isActive()) {
$this->listViewEntries = array();
$viewer->assign('LBL_MODULE_DISABLED', true);
}
foreach ($this->listViewEntries as $key => $listViewEntry) {
$productId = $listViewEntry->getId();
$subProducts = $listViewModel->getSubProducts($productId);
if ($subProducts) {
$listViewEntry->set('subProducts', $subProducts);
}
}
$noOfEntries = count($this->listViewEntries);
if (empty($sortOrder)) {
$sortOrder = "ASC";
}
if ($sortOrder == "ASC") {
$nextSortOrder = "DESC";
$sortImage = "downArrowSmall.png";
} else {
//.........这里部分代码省略.........
示例10: process
public function process(Vtiger_Request $request)
{
$recordId = $request->get('record');
$blockId = $request->get('blockid');
$views = $request->get('views');
$qualifiedModuleName = $request->getModule(false);
$mode = '';
$viewer = $this->getViewer($request);
if ($views != '') {
$views = implode($views, ',');
}
if ($recordId) {
$mode = 'edit';
} else {
}
$moduleModel = Settings_HideBlocks_Record_Model::getModuleInstanceByBlockId($blockId);
$recordStrucure = Vtiger_RecordStructure_Model::getInstanceForModule($moduleModel);
$structuredValues = $recordStrucure->getStructure();
$viewer->assign('RECORD_STRUCTURE', $structuredValues);
$blockInstance = Vtiger_Block::getInstance($blockId, $moduleModel);
$blockLabel = $blockInstance->label;
$blockModelList = $moduleModel->getBlocks();
$blockModel = $blockModelList[$blockLabel];
$fieldModelList = $blockModel->getFields();
$mandatoryFields = array();
if (!empty($fieldModelList)) {
$values[$blockLabel] = array();
foreach ($fieldModelList as $fieldName => $fieldModel) {
if ($fieldModel->isMandatory()) {
$mandatoryFields[$fieldName] = $fieldModel;
}
}
}
$viewer->assign('MANDATORY_FIELDS', $mandatoryFields);
//var_dump($structuredValues);
$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'], $qualifiedModuleName);
$dateFilters[$comparatorKey] = $comparatorInfo;
}
$viewer->assign('DATE_FILTERS', $dateFilters);
$viewer->assign('ADVANCED_FILTER_OPTIONS', Settings_Workflows_Field_Model::getAdvancedFilterOptions());
$viewer->assign('ADVANCED_FILTER_OPTIONS_BY_TYPE', Settings_Workflows_Field_Model::getAdvancedFilterOpsByFieldType());
$viewer->assign('COLUMNNAME_API', 'getName');
$recordModel = Settings_HideBlocks_Record_Model::getInstanceById($recordId, $qualifiedModuleName);
if ($recordModel) {
$viewer->assign('ADVANCE_CRITERIA', $this->transformToAdvancedFilterCondition($recordModel->get('conditions')));
}
$viewer->assign('MODE', $mode);
$viewer->assign('RECORD_ID', $recordId);
$viewer->assign('MODULE', 'HideBlocks');
$viewer->assign('SOURCE_MODULE', $moduleModel->get('name'));
$viewer->assign('QUALIFIED_MODULE', $qualifiedModuleName);
$viewer->assign('BLOCKID', $blockId);
$viewer->assign('ENABLED', $request->get('enabled'));
$viewer->assign('VIEWS', $views);
$viewer->assign('USER_MODEL', Users_Record_Model::getCurrentUserModel());
$viewer->view('Conditions.tpl', $qualifiedModuleName);
}
示例11: initializeListViewContents
public function initializeListViewContents(Vtiger_Request $request, Vtiger_Viewer $viewer)
{
$moduleName = $this->getModule($request);
$cvId = $request->get('cvid');
$pageNumber = $request->get('page');
$orderBy = $request->get('orderby');
$sortOrder = $request->get('sortorder');
$sourceModule = $request->get('src_module');
$sourceField = $request->get('src_field');
$sourceRecord = $request->get('src_record');
$searchKey = $request->get('search_key');
$searchValue = $request->get('search_value');
$currencyId = $request->get('currency_id');
//To handle special operation when selecting record from Popup
$getUrl = $request->get('get_url');
//Check whether the request is in multi select mode
$multiSelectMode = $request->get('multi_select');
if (empty($multiSelectMode)) {
$multiSelectMode = false;
}
if (empty($cvId)) {
$cvId = '0';
}
if (empty($pageNumber)) {
$pageNumber = '1';
}
$pagingModel = new Vtiger_Paging_Model();
$pagingModel->set('page', $pageNumber);
$moduleModel = Vtiger_Module_Model::getInstance($moduleName);
$listViewModel = Vtiger_ListView_Model::getInstanceForPopup($moduleName, $sourceModule);
$recordStructureInstance = Vtiger_RecordStructure_Model::getInstanceForModule($moduleModel);
if (empty($orderBy) && empty($sortOrder)) {
$moduleInstance = CRMEntity::getInstance($moduleName);
$orderBy = $moduleInstance->default_order_by;
$sortOrder = $moduleInstance->default_sort_order;
}
if (!empty($orderBy)) {
$listViewModel->set('orderby', $orderBy);
$listViewModel->set('sortorder', $sortOrder);
}
if (!empty($sourceModule)) {
$listViewModel->set('src_module', $sourceModule);
$listViewModel->set('src_field', $sourceField);
$listViewModel->set('src_record', $sourceRecord);
}
if (!empty($searchKey) && !empty($searchValue)) {
$listViewModel->set('search_key', $searchKey);
$listViewModel->set('search_value', $searchValue);
}
if (!empty($currencyId)) {
$listViewModel->set('currency_id', $currencyId);
}
if (!$this->listViewHeaders) {
$this->listViewHeaders = $listViewModel->getListViewHeaders();
}
//Added to support List Price
$field = new Vtiger_Field_Model();
$field->set('name', 'listprice');
$field->set('column', 'listprice');
$field->set('label', 'List Price');
$this->listViewHeaders['listprice'] = $field;
if (!$this->listViewEntries) {
$this->listViewEntries = $listViewModel->getListViewEntries($pagingModel);
}
foreach ($this->listViewEntries as $recordId => $recordModel) {
$recordModel->set('listprice', $recordModel->getProductsListPrice($sourceRecord));
}
$noOfEntries = count($this->listViewEntries);
if (empty($sortOrder)) {
$sortOrder = "ASC";
}
if ($sortOrder == "ASC") {
$nextSortOrder = "DESC";
$sortImage = "downArrowSmall.png";
} else {
$nextSortOrder = "ASC";
$sortImage = "upArrowSmall.png";
}
$viewer->assign('MODULE', $moduleName);
$viewer->assign('SOURCE_MODULE', $sourceModule);
$viewer->assign('SOURCE_FIELD', $sourceField);
$viewer->assign('SOURCE_RECORD', $sourceRecord);
$viewer->assign('SEARCH_KEY', $searchKey);
$viewer->assign('SEARCH_VALUE', $searchValue);
$viewer->assign('ORDER_BY', $orderBy);
$viewer->assign('SORT_ORDER', $sortOrder);
$viewer->assign('NEXT_SORT_ORDER', $nextSortOrder);
$viewer->assign('SORT_IMAGE', $sortImage);
$viewer->assign('GETURL', $getUrl);
$viewer->assign('CURRENCY_ID', $currencyId);
$viewer->assign('RECORD_STRUCTURE_MODEL', $recordStructureInstance);
$viewer->assign('RECORD_STRUCTURE', $recordStructureInstance->getStructure());
$viewer->assign('PAGING_MODEL', $pagingModel);
$viewer->assign('PAGE_NUMBER', $pageNumber);
$viewer->assign('LISTVIEW_ENTRIES_COUNT', $noOfEntries);
$viewer->assign('LISTVIEW_HEADERS', $this->listViewHeaders);
$viewer->assign('LISTVIEW_ENTRIES', $this->listViewEntries);
if (PerformancePrefs::getBoolean('LISTVIEW_COMPUTE_PAGE_COUNT', false)) {
if (!$this->listViewCount) {
$this->listViewCount = $listViewModel->getListViewCount();
//.........这里部分代码省略.........
示例12: process
public function process(Vtiger_Request $request)
{
$viewer = $this->getViewer($request);
$moduleName = $request->get('source_module');
$module = $request->getModule();
$record = $request->get('record');
$duplicate = $request->get('duplicate');
$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);
$recordStructure = $recordStructureInstance->getStructure();
// for Inventory module we should now allow item details block
if (in_array($moduleName, getInventoryModules())) {
$itemsBlock = "LBL_ITEM_DETAILS";
unset($recordStructure[$itemsBlock]);
}
$viewer->assign('RECORD_STRUCTURE', $recordStructure);
// Added to show event module custom fields
if ($moduleName == 'Calendar') {
$relatedModuleName = 'Events';
$relatedModuleModel = Vtiger_Module_Model::getInstance($relatedModuleName);
$relatedRecordStructureInstance = Vtiger_RecordStructure_Model::getInstanceForModule($relatedModuleModel);
$eventBlocksFields = $relatedRecordStructureInstance->getStructure();
$viewer->assign('EVENT_RECORD_STRUCTURE_MODEL', $relatedRecordStructureInstance);
$viewer->assign('EVENT_RECORD_STRUCTURE', $eventBlocksFields);
}
$viewer->assign('CUSTOMVIEW_MODEL', $customViewModel);
if ($duplicate != '1') {
$viewer->assign('RECORD_ID', $record);
}
$viewer->assign('MODULE', $module);
$viewer->assign('SOURCE_MODULE', $moduleName);
$viewer->assign('USER_MODEL', Users_Record_Model::getCurrentUserModel());
if ($customViewModel->get('viewname') == 'All') {
$viewer->assign('CV_PRIVATE_VALUE', CustomView_Record_Model::CV_STATUS_DEFAULT);
} else {
$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);
}
示例13: initializeListViewContents
public function initializeListViewContents(Vtiger_Request $request, Vtiger_Viewer $viewer) {
$moduleName = $this->getModule($request);
$sourceModule = $request->get('src_module');
$sourceField = $request->get('src_field');
if(in_array($sourceModule, array('Quotes', 'SalesOrder')) && $sourceField == 'potential_id') {
$relatedParentModule = $request->get('related_parent_module');
$relatedParentId = $request->get('related_parent_id');
if(empty($relatedParentModule)) {
return parent::initializeListViewContents($request, $viewer);
}
$cvId = $request->get('cvid');
$pageNumber = $request->get('page');
$orderBy = $request->get('orderby');
$sortOrder = $request->get('sortorder');
$sourceRecord = $request->get('src_record');
$searchKey = $request->get('search_key');
$searchValue = $request->get('search_value');
$currencyId = $request->get('currency_id');
$requestedPage = $pageNumber;
if(empty ($requestedPage)) {
$requestedPage = 1;
}
$pagingModel = new Vtiger_Paging_Model();
$pagingModel->set('page',$requestedPage);
$parentRecordModel = Vtiger_Record_Model::getInstanceById($relatedParentId, $relatedParentModule);
$relationListView = Vtiger_RelationListView_Model::getInstance($parentRecordModel, $moduleName, $label);
if($sortOrder == "ASC") {
$nextSortOrder = "DESC";
$sortImage = "icon-chevron-down";
} else {
$nextSortOrder = "ASC";
$sortImage = "icon-chevron-up";
}
if(!empty($orderBy)) {
$relationListView->set('orderby', $orderBy);
$relationListView->set('sortorder',$sortOrder);
}
$headers = $relationListView->getHeaders();
$models = $relationListView->getEntries($pagingModel);
$noOfEntries = count($models);
foreach ($models as $recordId => $recordModel) {
foreach ($headers as $fieldName => $fieldModel) {
$recordModel->set($fieldName, $recordModel->getDisplayValue($fieldName));
}
$models[$recordId] = $recordModel;
}
//To handle special operation when selecting record from Popup
$getUrl = $request->get('get_url');
//Check whether the request is in multi select mode
$multiSelectMode = $request->get('multi_select');
if(empty($multiSelectMode)) {
$multiSelectMode = false;
}
if(empty($cvId)) {
$cvId = '0';
}
if(empty ($pageNumber)){
$pageNumber = '1';
}
$moduleModel = Vtiger_Module_Model::getInstance($moduleName);
$recordStructureInstance = Vtiger_RecordStructure_Model::getInstanceForModule($moduleModel);
$viewer->assign('MODULE', $moduleName);
$viewer->assign('SOURCE_MODULE', $sourceModule);
$viewer->assign('SOURCE_FIELD', $sourceField);
$viewer->assign('SOURCE_RECORD', $sourceRecord);
$viewer->assign('RELATED_PARENT_MODULE', $relatedParentModule);
$viewer->assign('RELATED_PARENT_ID', $relatedParentId);
$viewer->assign('SEARCH_KEY', $searchKey);
$viewer->assign('SEARCH_VALUE', $searchValue);
$viewer->assign('ORDER_BY',$orderBy);
$viewer->assign('SORT_ORDER',$sortOrder);
$viewer->assign('NEXT_SORT_ORDER',$nextSortOrder);
$viewer->assign('SORT_IMAGE',$sortImage);
$viewer->assign('GETURL', $getUrl);
$viewer->assign('CURRENCY_ID', $currencyId);
$viewer->assign('RECORD_STRUCTURE_MODEL', $recordStructureInstance);
$viewer->assign('RECORD_STRUCTURE', $recordStructureInstance->getStructure());
$viewer->assign('PAGING_MODEL', $pagingModel);
$viewer->assign('PAGE_NUMBER',$pageNumber);
$viewer->assign('LISTVIEW_ENTIRES_COUNT',$noOfEntries);
//.........这里部分代码省略.........
示例14: initializeListViewContents
public function initializeListViewContents(Vtiger_Request $request, Vtiger_Viewer $viewer)
{
$moduleName = $this->getModule($request);
$cvId = $request->get('cvid');
$pageNumber = $request->get('page');
$orderBy = $request->get('orderby');
$sortOrder = $request->get('sortorder');
$sourceModule = $request->get('src_module');
$sourceField = $request->get('src_field');
$sourceRecord = $request->get('src_record');
$searchKey = $request->get('search_key');
$searchValue = $request->get('search_value');
$currencyId = $request->get('currency_id');
$selectedFields = $request->get('selectedFields');
if (!empty($selectedFields)) {
foreach ($selectedFields as $key => $value) {
$selectFields[$value] = $value;
}
}
$view = $request->get('view');
//To handle special operation when selecting record from Popup
$getUrl = $request->get('get_url');
//Enable multiselect mode for email related popup
$multiSelectMode = true;
if (empty($cvId)) {
$cvId = '0';
}
if (empty($pageNumber)) {
$pageNumber = '1';
}
$pagingModel = new Vtiger_Paging_Model();
$pagingModel->set('page', $pageNumber);
$moduleModel = Vtiger_Module_Model::getInstance($moduleName);
$listViewModel = Vtiger_ListView_Model::getInstanceForPopup($moduleName);
$recordStructureInstance = Vtiger_RecordStructure_Model::getInstanceForModule($moduleModel);
$primaryEmailFieldName = 'email';
if ($moduleName == 'Accounts' || $moduleName == 'Users') {
$primaryEmailFieldName = 'email1';
}
$listViewModel->extendPopupFields(array($primaryEmailFieldName => $primaryEmailFieldName));
if (!empty($orderBy)) {
$listViewModel->set('orderby', $orderBy);
$listViewModel->set('sortorder', $sortOrder);
}
if (!empty($sourceModule)) {
$listViewModel->set('src_module', $sourceModule);
$listViewModel->set('src_field', $sourceField);
$listViewModel->set('src_record', $sourceRecord);
}
if (!empty($searchKey) && !empty($searchValue)) {
$listViewModel->set('search_key', $searchKey);
$listViewModel->set('search_value', $searchValue);
}
if (!$this->listViewHeaders) {
$this->listViewHeaders = $listViewModel->getListViewHeaders();
}
if (!$this->listViewEntries) {
$this->listViewEntries = $listViewModel->getListViewEntries($pagingModel);
}
$noOfEntries = count($this->listViewEntries);
if (empty($sortOrder)) {
$sortOrder = "ASC";
}
if ($sortOrder == "ASC") {
$nextSortOrder = "DESC";
$sortImage = "downArrowSmall.png";
} else {
$nextSortOrder = "ASC";
$sortImage = "upArrowSmall.png";
}
$viewer->assign('MODULE', $moduleName);
$viewer->assign('SELECT_FIELDS', $selectFields);
$viewer->assign('SOURCE_MODULE', $sourceModule);
$viewer->assign('SOURCE_FIELD', $sourceField);
$viewer->assign('SOURCE_RECORD', $sourceRecord);
$viewer->assign('VIEW', $view);
$viewer->assign('SEARCH_KEY', $searchKey);
$viewer->assign('SEARCH_VALUE', $searchValue);
$viewer->assign('ORDER_BY', $orderBy);
$viewer->assign('SORT_ORDER', $sortOrder);
$viewer->assign('NEXT_SORT_ORDER', $nextSortOrder);
$viewer->assign('SORT_IMAGE', $sortImage);
$viewer->assign('GETURL', $getUrl);
$viewer->assign('CURRENCY_ID', $currencyId);
$viewer->assign('RECORD_STRUCTURE_MODEL', $recordStructureInstance);
$viewer->assign('RECORD_STRUCTURE', $recordStructureInstance->getStructure());
$viewer->assign('PAGING_MODEL', $pagingModel);
$viewer->assign('PAGE_NUMBER', $pageNumber);
$viewer->assign('LISTVIEW_ENTRIES_COUNT', $noOfEntries);
$viewer->assign('LISTVIEW_HEADERS', $this->listViewHeaders);
$viewer->assign('LISTVIEW_ENTRIES', $this->listViewEntries);
if (AppConfig::performance('LISTVIEW_COMPUTE_PAGE_COUNT')) {
if (!$this->listViewCount) {
$this->listViewCount = $listViewModel->getListViewCount();
}
$totalCount = $this->listViewCount;
$pageLimit = $pagingModel->getPageLimit();
$pageCount = ceil((int) $totalCount / (int) $pageLimit);
if ($pageCount == 0) {
$pageCount = 1;
//.........这里部分代码省略.........
示例15: step
public function step($step, Vtiger_Request $request)
{
$viewer = $this->getViewer($request);
$moduleName = $request->getModule();
$qualifiedModuleName = $request->getModule(false);
$recordId = $request->get('record');
if ($recordId) {
$pdfModel = Vtiger_PDF_Model::getInstanceById($recordId);
$viewer->assign('RECORDID', $recordId);
$viewer->assign('MODE', 'edit');
$selectedModuleName = $pdfModel->get('module_name');
} else {
$selectedModuleName = $request->get('source_module');
$pdfModel = Settings_PDF_Record_Model::getCleanInstance();
}
$viewer->assign('SELECTED_MODULE', $selectedModuleName);
$viewer->assign('PDF_MODEL', $pdfModel);
$allModules = Settings_PDF_Module_Model::getSupportedModules();
$viewer->assign('ALL_MODULES', $allModules);
$viewer->assign('MODULE', $moduleName);
$viewer->assign('QUALIFIED_MODULE', $qualifiedModuleName);
$viewer->assign('SOURCE_MODULE', $selectedModuleName);
switch ($step) {
case 'step8':
$viewer->view('Step8.tpl', $qualifiedModuleName);
break;
case 'step7':
$viewer->view('Step7.tpl', $qualifiedModuleName);
break;
case 'step6':
$moduleModel = Vtiger_Module_Model::getInstance($pdfModel->get('module_name'));
$recordStructureInstance = Vtiger_RecordStructure_Model::getInstanceForModule($moduleModel);
$viewer->assign('RECORD_STRUCTURE', $recordStructureInstance->getStructure());
$viewer->assign('ADVANCE_CRITERIA', Vtiger_AdvancedFilter_Helper::transformToAdvancedFilterCondition($pdfModel->get('conditions')));
$viewer->view('Step6.tpl', $qualifiedModuleName);
break;
case 'step5':
$relatedModules = Settings_PDF_Module_Model::getRelatedModules($pdfModel->get('module_name'));
if (count($relatedModules) > 0) {
$relatedFields = Settings_PDF_Module_Model::getMainModuleFields(reset($relatedModules));
} else {
$relatedFields = [];
}
$specialFunctions = Vtiger_PDF_Model::getSpecialFunctions($allModules[key($allModules)]->getName());
$viewer->assign('RELATED_MODULES', $relatedModules);
$viewer->assign('RELATED_FIELDS', $relatedFields);
$viewer->assign('SPECIAL_FUNCTIONS', $specialFunctions);
$viewer->view('Step5.tpl', $qualifiedModuleName);
break;
case 'step4':
$relatedModules = Settings_PDF_Module_Model::getRelatedModules($pdfModel->get('module_name'));
if (count($relatedModules) > 0) {
$relatedFields = Settings_PDF_Module_Model::getMainModuleFields(reset($relatedModules));
} else {
$relatedFields = [];
}
$specialFunctions = Vtiger_PDF_Model::getSpecialFunctions($allModules[key($allModules)]->getName());
$viewer->assign('RELATED_MODULES', $relatedModules);
$viewer->assign('RELATED_FIELDS', $relatedFields);
$viewer->assign('SPECIAL_FUNCTIONS', $specialFunctions);
$viewer->view('Step4.tpl', $qualifiedModuleName);
break;
case 'step3':
$relatedModules = Settings_PDF_Module_Model::getRelatedModules($pdfModel->get('module_name'));
if (count($relatedModules) > 0) {
$relatedFields = Settings_PDF_Module_Model::getMainModuleFields(reset($relatedModules));
} else {
$relatedFields = [];
}
$specialFunctions = Vtiger_PDF_Model::getSpecialFunctions($allModules[key($allModules)]->getName());
$viewer->assign('RELATED_MODULES', $relatedModules);
$viewer->assign('RELATED_FIELDS', $relatedFields);
$viewer->assign('SPECIAL_FUNCTIONS', $specialFunctions);
$viewer->view('Step3.tpl', $qualifiedModuleName);
break;
case 'step2':
$viewer->view('Step2.tpl', $qualifiedModuleName);
break;
case 'step1':
default:
$viewer->view('Step1.tpl', $qualifiedModuleName);
break;
}
}