You are here

public function CommerceFileLicenseEntity::get_time_remaining in Commerce File 7

File

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

Class

CommerceFileLicenseEntity
A Commerce File License entity class.

Code

public function get_time_remaining() {
  $rem = $this
    ->get_limit_remaining_value('duration');
  if (!$this
    ->check_limit_is_unlimited($rem) && is_numeric($rem) && $rem < 0) {

    // truncate to 0
    $rem = 0;
  }
  return $rem;
}