You are here

function hook_hosting_quota_get_usage in Hostmaster (Aegir) 6

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 modules/hosting/site/hosting_site.quota.inc
Implement hook_hosting_quota_get_usage
2 invocations of hook_hosting_quota_get_usage()
hosting_quota_check in modules/hosting/quota/hosting_quota.module
Quickly check if a given quota has been exceeded
hosting_quota_get_usage in modules/hosting/quota/hosting_quota.module
Get the usage for the specified resource

File

modules/hosting/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;
    }
  }
}