You are here

function zoomapi_extract_entity_info_from_meeting_context in Zoom API 7.2

Extract entity type/id from meeting context variable.

1 call to zoomapi_extract_entity_info_from_meeting_context()
zoomapi_api_create_meeting in ./zoomapi.api.inc
Create Zoom Meeting.

File

./zoomapi.module, line 786
Main file for the Zoom API module.

Code

function zoomapi_extract_entity_info_from_meeting_context($context) {
  $entity_type = !empty($context['entity_type']) ? $context['entity_type'] : '';
  $entity_id = !empty($context['entity_id']) ? $context['entity_id'] : 0;
  if (!empty($context['entity'])) {
    $entity_type = $entity_type ?: $context['entity']
      ->entityType();
    if (!$entity_id) {
      list($entity_id, , ) = entity_extract_ids($entity_type, $context['entity']);
    }
  }
  return [
    $entity_type,
    $entity_id,
  ];
}