You are here

function theme_hosting_quota_client in Hosting 7.4

Same name and namespace in other branches
  1. 6.2 quota/hosting_quota.module \theme_hosting_quota_client()
  2. 7.3 quota/hosting_quota.module \theme_hosting_quota_client()

Theme the client quota information.

Parameters

$variables array:

Return value

string

1 theme call to theme_hosting_quota_client()
hosting_quota_node_view in quota/hosting_quota.module
Implements hook_node_view().

File

quota/hosting_quota.module, line 473
Implement quota's for the resource used by client.

Code

function theme_hosting_quota_client($variables) {
  $node = $variables['node'];
  if (!empty($node->quota)) {
    $header = array(
      t('Resource'),
      t('Used'),
      t('Quota'),
    );
    foreach ($node->quota as $resource => $value) {
      $row = array();
      $row[] = $value['title'];
      $row[] = $value['rendered usage'];
      $row[] = $value['rendered limit'];
      $rows[] = $row;
    }
    return theme('table', array(
      'header' => $header,
      'rows' => $rows,
    ));
  }
  return '';
}