You are here

function pmpapi_push_entity_presave in Public Media Platform API Integration 7

Implements hook_entity_presave().

File

pmpapi_push/pmpapi_push.module, line 132
Maps drupal entities to MPM profiles, and pushes them to the PMP API.

Code

function pmpapi_push_entity_presave($entity, $type) {
  if (pmpapi_push_entity_ok_to_push($entity, $type) && empty($entity->pmpapi_guid)) {
    $entity->pmpapi_guid = pmpapi_guid();
  }
}