You are here

function messaging_template_get_keys in Messaging 6.3

Get template keys for a group

If a group has no keys, goes through the fallback system (using default fallbacks)

4 calls to messaging_template_get_keys()
messaging_template_admin_tree in messaging_template/messaging_template.admin.inc
Recursively build a table tree for fallback methods
messaging_template_edit_form in messaging_template/messaging_template.admin.inc
Edit message formats
Messaging_Template_Engine::get_keys in messaging_template/messaging_template.inc
Get part keys for a given template
Messaging_Template_Tests::testMessagingTemplateAPI in tests/messaging_template.test
Exercise basic API functions

File

messaging_template/messaging_template.module, line 154
Template system for Messaging Framework

Code

function messaging_template_get_keys($name, $language = NULL) {
  $keys = messaging_template_invoke_all('keys', $name, $language);
  if (!$keys && ($fallback = messaging_template_fallback($name))) {
    return messaging_template_get_keys($fallback, $language);
  }
  else {
    return $keys;
  }
}