[ Index ] |
PHP Cross Reference of vtigercrm-6.1.0 |
[Summary view] [Print] [Text view]
1 <?php 2 /*+*********************************************************************************** 3 * The contents of this file are subject to the vtiger CRM Public License Version 1.0 4 * ("License"); You may not use this file except in compliance with the License 5 * The Original Code is: vtiger CRM Open Source 6 * The Initial Developer of the Original Code is vtiger. 7 * Portions created by vtiger are Copyright (C) vtiger. 8 * All Rights Reserved. 9 *************************************************************************************/ 10 vimport('~~modules/PickList/DependentPickListUtils.php'); 11 12 class Settings_PickListDependency_Module_Model extends Settings_Vtiger_Module_Model { 13 14 var $baseTable = 'vtiger_picklist_dependency'; 15 var $baseIndex = 'id'; 16 var $name = 'PickListDependency'; 17 18 /** 19 * Function to get the url for default view of the module 20 * @return <string> - url 21 */ 22 public function getDefaultUrl() { 23 return 'index.php?module=PickListDependency&parent=Settings&view=List'; 24 } 25 26 /** 27 * Function to get the url for Adding Dependency 28 * @return <string> - url 29 */ 30 public function getCreateRecordUrl() { 31 return "javascript:Settings_PickListDependency_Js.triggerAdd(event)"; 32 } 33 34 public function isPagingSupported() { 35 return false; 36 } 37 38 public static function getAvailablePicklists($module) { 39 return Vtiger_DependencyPicklist::getAvailablePicklists($module); 40 } 41 42 public static function getPicklistSupportedModules() { 43 $adb = PearDatabase::getInstance(); 44 45 $query = "SELECT distinct vtiger_field.tabid, vtiger_tab.tablabel, vtiger_tab.name as tabname FROM vtiger_field 46 INNER JOIN vtiger_tab ON vtiger_tab.tabid = vtiger_field.tabid 47 WHERE uitype IN ('15','16') 48 AND vtiger_field.tabid != 29 49 AND vtiger_field.displaytype = 1 50 AND vtiger_field.presence in ('0','2') 51 AND vtiger_field.block != 'NULL' 52 GROUP BY vtiger_field.tabid HAVING count(*) > 1"; 53 // END 54 $result = $adb->pquery($query, array()); 55 while($row = $adb->fetch_array($result)) { 56 $modules[$row['tablabel']] = $row['tabname']; 57 } 58 ksort($modules); 59 60 $modulesModelsList = array(); 61 foreach($modules as $moduleLabel => $moduleName) { 62 $instance = new Vtiger_Module_Model(); 63 $instance->name = $moduleName; 64 $instance->label = $moduleLabel; 65 $modulesModelsList[] = $instance; 66 } 67 return $modulesModelsList; 68 } 69 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Fri Nov 28 20:08:37 2014 | Cross-referenced by PHPXref 0.7.1 |