You are here

function opigno_moxtra_opigno_moxtra_meeting_delete in Opigno Moxtra 3.x

Same name and namespace in other branches
  1. 8 opigno_moxtra.module \opigno_moxtra_opigno_moxtra_meeting_delete()

Implements hook_ENTITY_TYPE_delete().

Deletes meeting in the Moxtra.

File

./opigno_moxtra.module, line 740
Contains opigno_moxtra.module.

Code

function opigno_moxtra_opigno_moxtra_meeting_delete(EntityInterface $entity) {
  if (!_opigno_moxtra_is_active()) {
    return;
  }

  /** @var \Drupal\opigno_moxtra\MeetingInterface $entity */
  $moxtra_api = _opigno_moxtra_get_moxtra_api();
  $owner_id = $entity
    ->getOwnerId();
  $session_key = $entity
    ->getSessionKey();
  $moxtra_api
    ->deleteMeeting($owner_id, $session_key);
}