Created
October 18, 2012 02:22
-
-
Save eggsurplus/3909518 to your computer and use it in GitHub Desktop.
Safely Customizing a Core Bean in SugarCRM - Part 1. SOCustomCase
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); | |
| //custom/modules/Cases/SOCustomCase.php | |
| require_once("modules/Cases/Case.php"); | |
| class SOCustomCase extends aCase { | |
| function get_list_view_data(){ | |
| $temp_array = parent::get_list_view_data(); //let it work as it does by default | |
| //now do our customization | |
| if(empty($temp_array['ASSIGNED_USER_ID']) || $temp_array['ASSIGNED_USER_NAME'] == "portal") { | |
| $temp_array['ASSIGNED_USER_NAME'] = "<a href='index.php?module=Cases&action=GrabCase&record=$this->id'>".SugarThemeRegistry::current()->getImage("uparrow_inline","title='".translate('LBL_GRAB_CASE','Cases')."' border='0'",null,null,'.gif',translate('LBL_GRAB_CASE','Cases'))."</a>"; | |
| } | |
| return $temp_array; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment