You are here

public function CommerceFileLicenseEntity::get_state in Commerce File 7

State

  • Read / Write
2 calls to CommerceFileLicenseEntity::get_state()
CommerceFileLicenseEntity::is_allowed in includes/commerce_file_license.entity.inc
Returns true if license is in the allowed state
CommerceFileLicenseEntity::set_state in includes/commerce_file_license.entity.inc
Set state

File

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

Class

CommerceFileLicenseEntity
A Commerce File License entity class.

Code

public function get_state() {
  if (!isset($this->state)) {
    $state = FALSE;
    if (isset($this->status)) {
      $status = commerce_file_license_status_load($this->status);
      $state = $status['state'];
    }
    $this->state = $state;
  }
  return $this->state;
}