You are here

function commerce_license_get_access_details in Commerce License 7

Returns the access details of an activated license, or "N/A" if the license hasn't been activated yet or has no access details.

1 call to commerce_license_get_access_details()
commerce_license_handler_field_access_details::render_single_value in includes/views/handlers/commerce_license_handler_field_access_details.inc
Render a single field value.
1 string reference to 'commerce_license_get_access_details'
CommerceLicenseMetadataController::entityPropertyInfo in ./commerce_license.info.inc
Overrides EntityDefaultMetadataController::entityPropertyInfo().

File

./commerce_license.module, line 919
Provides a framework for selling access to local or remote resources.

Code

function commerce_license_get_access_details($license) {
  if ($license->status > COMMERCE_LICENSE_PENDING) {
    $access_details = $license
      ->accessDetails();
    return $access_details ? $access_details : t('N/A');
  }
  else {

    // This license hasn't been activated yet.
    return t('N/A');
  }
}