[ 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 11 class Campaigns_ListView_Model extends Vtiger_ListView_Model { 12 13 /** 14 * Function to get the list of listview links for the module 15 * @param <Array> $linkParams 16 * @return <Array> - Associate array of Link Type to List of Vtiger_Link_Model instances 17 */ 18 public function getListViewLinks($linkParams) { 19 $currentUserModel = Users_Record_Model::getCurrentUserModel(); 20 $moduleModel = $this->getModule(); 21 22 $linkTypes = array('LISTVIEWBASIC', 'LISTVIEW', 'LISTVIEWSETTING'); 23 $links = Vtiger_Link_Model::getAllByType($moduleModel->getId(), $linkTypes, $linkParams); 24 25 $basicLinks = array(); 26 27 $createPermission = Users_Privileges_Model::isPermitted($moduleModel->getName(), 'EditView'); 28 if($createPermission) { 29 $basicLinks[] = array( 30 'linktype' => 'LISTVIEWBASIC', 31 'linklabel' => 'LBL_ADD_RECORD', 32 'linkurl' => $moduleModel->getCreateRecordUrl(), 33 'linkicon' => '' 34 ); 35 } 36 37 foreach($basicLinks as $basicLink) { 38 $links['LISTVIEWBASIC'][] = Vtiger_Link_Model::getInstanceFromValues($basicLink); 39 } 40 41 $advancedLinks = array(); 42 43 foreach($advancedLinks as $advancedLink) { 44 $links['LISTVIEW'][] = Vtiger_Link_Model::getInstanceFromValues($advancedLink); 45 } 46 47 if($currentUserModel->isAdminUser()) { 48 49 $settingsLinks = $this->getSettingLinks(); 50 foreach($settingsLinks as $settingsLink) { 51 $links['LISTVIEWSETTING'][] = Vtiger_Link_Model::getInstanceFromValues($settingsLink); 52 } 53 } 54 55 return $links; 56 } 57 }
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 |