You are here

public function CommerceFileLicenseEntity::get_limit_check_access in Commerce File 7

Returns check access for a given limit property

File

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

Class

CommerceFileLicenseEntity
A Commerce File License entity class.

Code

public function get_limit_check_access($property) {
  $limits = $this
    ->get_limits();
  if (isset($limits[$property])) {

    // return TRUE if property is unlimited
    if ($this
      ->check_limit_is_unlimited($limits[$property])) {
      return TRUE;
    }

    // invoke check callback
    $result = _commerce_file_license_invoke_callback('check_access', $property, $this, $limits[$property]);
    if (isset($result)) {
      return $result;
    }
  }

  // default to FALSE
  return FALSE;
}