You are here

function gdpr_consent_agreement_load in General Data Protection Regulation 7

Menu autoloader for gdpr agreements.

File

modules/gdpr_consent/gdpr_consent.module, line 264
Contains hook implementations and shared functions.

Code

function gdpr_consent_agreement_load($id, $revision_id = NULL) {
  if (is_numeric($revision_id)) {
    $entity = entity_revision_load('gdpr_consent_agreement', $revision_id);
    return $entity;
  }
  else {
    $entity = entity_load_single('gdpr_consent_agreement', $id);
  }
  return $entity;
}