You are here

function _civicrm_entity_post_invoke in CiviCRM Entity 8.3

Invokes the post save hooks for a CiviCRM entity.

Parameters

string $op: The operation being performed.

\Drupal\civicrm_entity\CiviEntityStorage $storage: The entity storage.

\Drupal\Core\Entity\EntityInterface $entity: The entity.

1 call to _civicrm_entity_post_invoke()
civicrm_entity_civicrm_post in ./civicrm_entity.module
Implements hook_civicrm_post().

File

./civicrm_entity.module, line 472
Module file for the CiviCRM Entity module.

Code

function _civicrm_entity_post_invoke($op, $storage, $entity) {
  switch ($op) {
    case 'create':
      $storage
        ->civiPostSave($entity, FALSE);
      break;
    case 'delete':
      $storage
        ->civiPostDelete($entity);
      break;
    case 'restore':
      $storage
        ->civiPostSave($entity, TRUE);
      break;
    case 'edit':
      $storage
        ->civiPostSave($entity, TRUE);
      break;
  }
}