You are here

function theme_memcache_admin_stats_table in Memcache API and Integration 5.2

Same name and namespace in other branches
  1. 5 memcache_admin/memcache_admin.module \theme_memcache_admin_stats_table()
  2. 6 memcache_admin/memcache_admin.module \theme_memcache_admin_stats_table()
  3. 7 memcache_admin/memcache_admin.module \theme_memcache_admin_stats_table()
1 theme call to theme_memcache_admin_stats_table()
memcache_admin_stats in memcache_admin/memcache_admin.module

File

memcache_admin/memcache_admin.module, line 101

Code

function theme_memcache_admin_stats_table($server, $stats) {
  $rows = array();
  foreach ($stats as $key => $value) {
    if (is_array($value)) {
      $rs = array();
      foreach ($value as $k => $v) {
        $rs[] = array(
          $k,
          $v,
        );
      }
      $rows[] = array(
        $key,
        theme('table', array(
          '',
          '',
        ), $rs),
      );
    }
    else {
      $rows[] = array(
        $key,
        $value,
      );
    }
  }
  return theme('table', array(
    t('Property'),
    t('Value'),
  ), $rows, array(), $server);
}