You are here

function redhen_engagement_property_source_get in RedHen CRM 7

Callback to get $engagement->entity.

See also

redhen_engagement_entity_property_info()

1 string reference to 'redhen_engagement_property_source_get'
RedhenEngagementMetadataController::entityPropertyInfo in modules/redhen_engagement/lib/redhen_engagement.metadata.inc
Override parent to define entity propery metadat for engagements.

File

modules/redhen_engagement/redhen_engagement.module, line 481
RedhenEngagement hook implementations and API

Code

function redhen_engagement_property_source_get($engagement, array $options, $property_name, $entity_type) {
  $entity = entity_load_single($engagement->entity_type, $engagement->entity_id);
  return $entity ? entity_metadata_wrapper($engagement->entity_type, $entity) : NULL;
}