$tplname = $ext->getTemplatePath(CRM_Utils_System::getClassName($this)) . DIRECTORY_SEPARATOR . $filename;
}
else {
- $tplname = str_replace('_',
- DIRECTORY_SEPARATOR,
- CRM_Utils_System::getClassName($this)
- ) . '.tpl';
+ $tplname = strtr(
+ CRM_Utils_System::getClassName($this),
+ array(
+ '_' => DIRECTORY_SEPARATOR,
+ '\\' => DIRECTORY_SEPARATOR,
+ )
+ ) . '.tpl';
}
return $tplname;
}
* @return string
*/
public function getTemplateFileName() {
- return str_replace('_',
- DIRECTORY_SEPARATOR,
- CRM_Utils_System::getClassName($this)
+ return strtr(
+ CRM_Utils_System::getClassName($this),
+ array(
+ '_' => DIRECTORY_SEPARATOR,
+ '\\' => DIRECTORY_SEPARATOR,
+ )
) . '.tpl';
}