\n
";
$module = preg_replace("/ /","",$this->module);
$params = $this->_getModuleTitleParams();
$count = count($params);
$index = 0;
foreach($params as $parm){
$index++;
$theTitle .= $parm;
if($index < $count){
$theTitle .= "»";
}
}
$theTitle .= "
\n";
if ($show_help) {
$theTitle .= "
";
if (isset($this->action) && $this->action != "EditView") {
$printImageURL = SugarThemeRegistry::current()->getImageURL('print.gif');
$theTitle .= <<
{$GLOBALS['app_strings']['LNK_PRINT']}
EOHTML;
}
$helpImageURL = SugarThemeRegistry::current()->getImageURL('help.gif');
$theTitle .= <<
{$GLOBALS['app_strings']['LNK_HELP']}
EOHTML;
}
$theTitle .= " \n";
return $theTitle;
}
/**
* Return the metadata file that will be used by this view.
*
* @return string File location of the metadata file.
*/
public function getMetaDataFile(){
$metadataFile = null;
$foundViewDefs = false;
$viewDef = strtolower($this->type) . 'viewdefs';
$coreMetaPath = 'modules/'.$this->module.'/metadata/' . $viewDef . '.php';
if(file_exists('custom/' .$coreMetaPath )){
$metadataFile = 'custom/' . $coreMetaPath;
$foundViewDefs = true;
}else{
if(file_exists('custom/modules/'.$this->module.'/metadata/metafiles.php')){
require_once('custom/modules/'.$this->module.'/metadata/metafiles.php');
if(!empty($metafiles[$this->module][$viewDef])){
$metadataFile = $metafiles[$this->module][$viewDef];
$foundViewDefs = true;
}
}elseif(file_exists('modules/'.$this->module.'/metadata/metafiles.php')){
require_once('modules/'.$this->module.'/metadata/metafiles.php');
if(!empty($metafiles[$this->module][$viewDef])){
$metadataFile = $metafiles[$this->module][$viewDef];
$foundViewDefs = true;
}
}
}
if(!$foundViewDefs && file_exists($coreMetaPath)){
$metadataFile = $coreMetaPath;
}
$GLOBALS['log']->debug("metadatafile=". $metadataFile);
return $metadataFile;
}
/**
* Returns an array composing of the breadcrumbs to use for the module title
*
* @return array
*/
protected function _getModuleTitleParams($bTitle=false)
{
$params = array($this->_getModuleTitleListParam($bTitle));
if (isset($this->action)){
switch ($this->action) {
case 'EditView':
if(!empty($this->bean->id)) {
$params[] = "