You are here

function zoomapi_create_meeting_for_entity in Zoom API 7.2

Create Meeting for Entity.

1 call to zoomapi_create_meeting_for_entity()
zoomapi_create_instant_meeting_for_user in ./zoomapi.module
Create Instant Meeting for User.

File

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

Code

function zoomapi_create_meeting_for_entity($entity, $entity_type, array $params = [], $uid = 0) {
  if (is_numeric($entity)) {
    $entity = entity_load_single($entity_type, $entity);
  }
  $context = [
    'entity_type' => $entity_type,
    'entity' => $entity,
    'uid' => $uid ?: $entity->uid,
  ];
  if (empty($params['topic'])) {
    $entity_wrapper = entity_metadata_wrapper($entity_type, $entity);
    $params['topic'] = $entity_wrapper
      ->label();
  }
  drupal_alter('zoomapi_create_meeting_for_entity', $params, $context);
  return zoomapi_create_meeting($context['uid'], $params, $context);
}