You are here

function gdpr_consent_field_property_entity_get in General Data Protection Regulation 7

Getter callback for the consent agreement entity.

1 string reference to 'gdpr_consent_field_property_entity_get'
gdpr_consent_field_gdpr_user_consent_property_callback in modules/gdpr_consent/gdpr_consent.module
Property info for gdpr consent fields.

File

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

Code

function gdpr_consent_field_property_entity_get($data, array $options, $name, $type, $info) {
  if (!empty($data['target_id']) && !empty($data['target_revision_id']) && ($consent = entity_revision_load('gdpr_consent_agreement', $data['target_revision_id']))) {
    return $consent;
  }
}