function _commerce_file_license_property_duration_current in Commerce File 7
Current Callback for License duration
Parameters
$license: The Commerce File License entity
Return value
The current value of the property
2 calls to _commerce_file_license_property_duration_current()
- _commerce_file_license_property_duration_check_access in ./
commerce_file.commerce.inc - Check Callback for License duration
- _commerce_file_license_property_duration_remaining in ./
commerce_file.commerce.inc - Remaining Callback for License duration
1 string reference to '_commerce_file_license_property_duration_current'
File
- ./
commerce_file.commerce.inc, line 87 - Implementations of Commerce Hooks
Code
function _commerce_file_license_property_duration_current($license) {
if (!empty($license->granted)) {
return REQUEST_TIME - $license->granted;
}
}