function hook_commerce_file_license_status_info in Commerce File 7
Defines statuses for use in managing licenses.
An status is a single step in the life-cycle of a license that administrators can use to know at a glance what has occurred to the license already and/or what the next step in processing the license will be.
The Commerce File module defines several statuses in its own implementation of this hook, commerce_file_commerce_file_license_status_info():
- Pending: in the Denied state; used for licenses that have been created but are awaiting some type of approval
- Active: default status of the Allowed state; used to indicate the license can be accessed by the owner. Currently the only Allowed status.
- Canceled: additional status for the Denied state; used to indicate licenses where the owner's access has been canceled.
- Revoked: default status of the Denied state; used for licenses where the owner's access has been revoked.
The status array structure is as follows:
- name: machine-name identifying the status using lowercase alphanumeric characters, -, and _
- title: the translatable title of the status, used in administrative interfaces
- state: the name of the state the status belongs to
- weight: integer weight of the status used for sorting lists of statuses; defaults to 0
- enabled: TRUE or FALSE indicating if the status is enabled, with disabled statuses not being available for use; defaults to TRUE
Return value
An array of status arrays keyed by name.
1 function implements hook_commerce_file_license_status_info()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- commerce_file_commerce_file_license_status_info in includes/
commerce_file.entities.inc - Implements hook_commerce_file_license_status_info().
1 invocation of hook_commerce_file_license_status_info()
- commerce_file_license_statuses in includes/
commerce_file.entities.inc - Returns an array of some or all of the statuses keyed by name.
File
- ./
commerce_file.api.php, line 95 - Hooks provided by the Commerce File module.
Code
function hook_commerce_file_license_status_info() {
$statuses = array();
$statuses['active'] = array(
'name' => 'active',
'title' => t('Active'),
'state' => 'allowed',
'weight' => 0,
);
return $statuses;
}