You are here

function hook_hosting_quota_get_usage in Hosting 6.2

Same name and namespace in other branches
  1. 7.4 quota/hosting_quota.api.php \hook_hosting_quota_get_usage()
  2. 7.3 quota/hosting_quota.api.php \hook_hosting_quota_get_usage()

Definition of hook_hosting_quota_get_usage

Parameters

$client int: The nid of the client node

$resource string: The machine name of the resource

$start string: A MySQL format date

$end string: Another MySQL format date

Return value

int Return an integer that can be compared to what the quota is set to

Related topics

1 function implements hook_hosting_quota_get_usage()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

hosting_site_hosting_quota_get_usage in site/hosting_site.quota.inc
Implement hook_hosting_quota_get_usage
2 invocations of hook_hosting_quota_get_usage()
hosting_quota_check in quota/hosting_quota.module
Quickly check if a given quota has been exceeded
hosting_quota_get_usage in quota/hosting_quota.module
Get the usage for the specified resource

File

quota/hosting_quota.api.php, line 42
Hooks provided by the hosting quota module.

Code

function hook_hosting_quota_get_usage($client, $resource, $start, $end) {
  if (hosting_get_client($client)) {
    switch ($resource) {
      case 'foo':

        // Do some things
        return $usage;
    }
  }
}