You are here

public function CommerceFileLicenseEntity::can_download in Commerce File 7

Returns true if license can be downloaded

File

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

Class

CommerceFileLicenseEntity
A Commerce File License entity class.

Code

public function can_download($account = NULL) {
  global $user;
  $account = isset($account) ? $account : $user;
  return $this
    ->is_allowed() && $this
    ->access('view', $account) && $this
    ->invoke('download')->download_allowed;
}