static function Messaging_Template_Engine::get_default in Messaging 6.3
Get default provided by modules
1 call to Messaging_Template_Engine::get_default()
- Messaging_Template_Engine::get_template_part in messaging_template/
messaging_template.inc - Get template part, FALSE if not found
File
- messaging_template/
messaging_template.inc, line 112 - Base classes for messaging templates
Class
- Messaging_Template_Engine
- Static template functions that interact with the module API
Code
static function get_default($type, $key, $language) {
$lang = $language->language;
self::_debug('Getting template default', array(
'type' => $type,
'key' => $key,
'language' => $lang,
));
if (!isset(self::$defaults[$lang][$type])) {
self::$defaults[$lang][$type] = messaging_template_get_defaults($type, $language);
}
if (!isset(self::$defaults[$lang][$type][$key])) {
if ($type_fallback = self::type_fallback($type)) {
self::$defaults[$lang][$type][$key] = self::get_default($type_fallback, $key, $language);
}
else {
self::$defaults[$lang][$type][$key] = FALSE;
}
}
return self::$defaults[$lang][$type][$key];
}