You are here

function messaging_template_get_tree in Messaging 6.4

Build fallback tree

2 calls to messaging_template_get_tree()
messaging_template_admin_template in messaging_template/messaging_template.admin.inc
messaging_template_get_branch in messaging_template/messaging_template.admin.inc
Build fallback sub-tree (only parents and children of given template)

File

messaging_template/messaging_template.admin.inc, line 100
Messaging Framework - Admin UI

Code

function messaging_template_get_tree() {

  // List message groups from all modules
  $templates = module_invoke_all('messaging', 'message groups');
  $tree = array();
  foreach ($templates as $key => &$template) {
    if (empty($template['fallback'])) {
      $tree[$key] =& $template;
    }
    else {
      $templates[$template['fallback']]['children'][$key] =& $template;
    }
  }
  return $tree;
}