PATH:
home
/
letacommog
/
crmleta
/
modules
/
Vtiger
/
models
<?php /*+*********************************************************************************** * The contents of this file are subject to the vtiger CRM Public License Version 1.0 * ("License"); You may not use this file except in compliance with the License * The Original Code is: vtiger CRM Open Source * The Initial Developer of the Original Code is vtiger. * Portions created by vtiger are Copyright (C) vtiger. * All Rights Reserved. *************************************************************************************/ /** * Vtiger Menu Model Class */ class Vtiger_Menu_Model extends Vtiger_Module_Model { /** * Static Function to get all the accessible menu models with/without ordering them by sequence * @param <Boolean> $sequenced - true/false * @return <Array> - List of Vtiger_Menu_Model instances */ public static function getAll($sequenced = false) { $currentUser = Users_Record_Model::getCurrentUserModel(); $userPrivModel = Users_Privileges_Model::getCurrentUserPrivilegesModel(); $restrictedModulesList = array('Emails', 'ProjectMilestone', 'ProjectTask', 'ModComments', 'Integration', 'PBXManager', 'Dashboard', 'Home'); $allModules = parent::getAll(array('0','2')); $menuModels = array(); $moduleSeqs = Array(); $moduleNonSeqs = Array(); foreach($allModules as $module){ if($module->get('tabsequence') != -1){ $moduleSeqs[$module->get('tabsequence')] = $module; }else { $moduleNonSeqs[] = $module; } } ksort($moduleSeqs); $modules = array_merge($moduleSeqs, $moduleNonSeqs); foreach($modules as $module) { if (($userPrivModel->isAdminUser() || $userPrivModel->hasGlobalReadPermission() || $userPrivModel->hasModulePermission($module->getId()))& !in_array($module->getName(), $restrictedModulesList) && $module->get('parent') != '') { $menuModels[$module->getName()] = $module; } } return $menuModels; } /** * Static Function to get all the accessible module model for Quick Create * @return <Array> - List of Vtiger_Menu_Model instances */ public static function getAllForQuickCreate() { $userPrivModel = Users_Privileges_Model::getCurrentUserPrivilegesModel(); $restrictedModulesList = array('Emails', 'ModComments', 'Integration', 'PBXManager', 'Dashboard', 'Home'); $allModules = parent::getAll(array('0', '2')); $menuModels = array(); foreach ($allModules as $module) { if (($userPrivModel->isAdminUser() || $userPrivModel->hasGlobalReadPermission() || $userPrivModel->hasModulePermission($module->getId())) && !in_array($module->getName(), $restrictedModulesList) && $module->get('parent') != '') { $menuModels[$module->getName()] = $module; } } uksort($menuModels, array('Vtiger_MenuStructure_Model', 'sortMenuItemsByProcess')); return $menuModels; } }
[+]
..
[-] MenuStructure.php
[edit]
[-] SummaryRecordStructure.php
[edit]
[-] Action.php
[edit]
[-] TrackRecord.php
[edit]
[-] Utility.php
[edit]
[-] DetailRecordStructure.php
[edit]
[-] QuickCreateRecordStructure.php
[edit]
[-] ModuleMeta.php
[edit]
[-] MassEditRecordStructure.php
[edit]
[-] CompanyDetails.php
[edit]
[-] Block.php
[edit]
[-] RecipientPreference.php
[edit]
[-] CssScript.php
[edit]
[-] DashBoard.php
[edit]
[-] DetailView.php
[edit]
[-] Image.php
[edit]
[-] EditView.php
[edit]
[-] Record.php
[edit]
[-] Widget.php
[edit]
[-] Tag.php
[edit]
[-] FindDuplicate.php
[edit]
[-] MiniList.php
[edit]
[-] ListView.php
[edit]
[-] Menu.php
[edit]
[-] RelationListView.php
[edit]
[-] Notebook.php
[edit]
[-] FilterRecordStructure.php
[edit]
[-] RecordStructure.php
[edit]
[-] TooltipView.php
[edit]
[-] JsScript.php
[edit]
[-] EditRecordStructure.php
[edit]
[-] Paging.php
[edit]
[-] Link.php
[edit]
[-] Field.php
[edit]
[-] Relation.php
[edit]
[-] Module.php
[edit]