You are here

function memcache_storage_page_bottom in Memcache Storage 8

Implements hook_page_bottom().

File

./memcache_storage.module, line 14

Code

function memcache_storage_page_bottom(array &$page_bottom) {

  // Show the table only to users with the appropriate permission.
  if (!\Drupal::currentUser()
    ->hasPermission('access memcache storage debug')) {
    return;
  }

  // If table is empty - there is nothing to show at all.
  $summary_table = DrupalMemcachedDebug::getSummaryLogTable();
  if (empty($summary_table)) {
    return;
  }
  $defailed_table = DrupalMemcachedDebug::getDetailedLogTable();
  $page_bottom['memcache_storage_summary'] = $summary_table;
  $page_bottom['memcache_storage_detailed'] = $defailed_table;
}