Here in Holland, we use a middlename, like "Vincent van Gogh". I'm sure you've heard of it!
Now, I cannot override Person, because of:
I would like to override these SugarObjects, just as I can with the Controller and View! I know that Sugar plans to make Beans over ridable, and I just want to make sure this is over ridable as wellPHP Code:function addTemplate($module, $object, $template, $object_name=false){
if($template == 'default')$template = 'basic';
$templates = array();
$fields = array();
if(empty($object_name))$object_name = $object;
$_object_name = strtolower($object_name);
if(empty($templates[$template])){
$path = 'include/SugarObjects/templates/' . $template . '/vardefs.php';
if(file_exists($path)){
require($path);
$templates[$template] = $vardefs;
}else{
$path = 'include/SugarObjects/implements/' . $template . '/vardefs.php';
if(file_exists($path)){
require($path);
$templates[$template] = $vardefs;
}
}
}
if(!empty($templates[$template])){
if(empty($GLOBALS['dictionary'][$object]['fields']))$GLOBALS['dictionary'][$object]['fields'] = array();
if(empty($GLOBALS['dictionary'][$object]['relationships']))$GLOBALS['dictionary'][$object]['relationships'] = array();
if(empty($GLOBALS['dictionary'][$object]['indices']))$GLOBALS['dictionary'][$object]['indices'] = array();
$GLOBALS['dictionary'][$object]['fields'] = array_merge($templates[$template]['fields'], $GLOBALS['dictionary'][$object]['fields']);
if(!empty($templates[$template]['relationships']))$GLOBALS['dictionary'][$object]['relationships'] = array_merge($templates[$template]['relationships'], $GLOBALS['dictionary'][$object]['relationships']);
if(!empty($templates[$template]['indices']))$GLOBALS['dictionary'][$object]['indices'] = array_merge($templates[$template]['indices'], $GLOBALS['dictionary'][$object]['indices']);
}
}
.


LinkBack URL
About LinkBacks
.




Reply With Quote



Bookmarks