You are here

public function CommerceFileLicenseEntity::get_limit_remaining_value in Commerce File 7

Returns remaining value for a given limit property

1 call to CommerceFileLicenseEntity::get_limit_remaining_value()
CommerceFileLicenseEntity::get_time_remaining in includes/commerce_file_license.entity.inc

File

includes/commerce_file_license.entity.inc, line 697
Provides a base class for CommerceFileLicenseEntity.

Class

CommerceFileLicenseEntity
A Commerce File License entity class.

Code

public function get_limit_remaining_value($property) {
  $limits = $this
    ->get_limits();
  if (isset($limits[$property]) && !$this
    ->check_limit_is_unlimited($limits[$property])) {
    return _commerce_file_license_invoke_callback('remaining', $property, $this, $limits[$property]);
  }

  // default to unlimited
  return $this
    ->get_data_unlimited_value();
}