You are here

function _messaging_debug_format_log in Messaging 6.2

Same name and namespace in other branches
  1. 6.3 messaging_debug/messaging_debug.module \_messaging_debug_format_log()

Format complex log as collapsible fieldset

1 call to _messaging_debug_format_log()
messaging_log_format in ./messaging.module
Format logs
1 string reference to '_messaging_debug_format_log'
messaging_log_format in ./messaging.module
Format logs

File

messaging_debug/messaging_debug.module, line 327
Simple messaging using html page. Messaging method plug-in

Code

function _messaging_debug_format_log($type, $string, $append, $objects) {
  $content = '';
  foreach ($objects as $key => $value) {
    $content .= _messaging_debug_format_object($value, $key);
  }

  // Build collapsible fieldset
  $field['object'] = array(
    '#type' => 'fieldset',
    '#title' => $string,
    '#collapsible' => TRUE,
    '#collapsed' => TRUE,
    '#description' => $append ? implode(' ', $append) : '',
  );
  $field['object']['content']['#value'] = $content;
  return drupal_render($field);
}