function zoomapi_meeting_topic_generate_for_entity in Zoom API 7
Generate topic for a entity-based Zoom meeting.
@todo add drupal_alter hook.
Parameters
object $account: The drupal account acting as meeting host.
object $entity: The entity the meeting is being created for.
string $entity_type: The type (node, user, etc.) of entity.
array $options: Optional array of meeting options.
Return value
string The meeting topic.
2 calls to zoomapi_meeting_topic_generate_for_entity()
- zoomapi_meeting_create_for_entity in ./
zoomapi.module - Create Meeting for Entity.
- zoomapi_meeting_create_instant_meeting in ./
zoomapi.module - Create Instant Meeting for Account.
File
- ./
zoomapi.module, line 641 - Main file for the Zoom API module.
Code
function zoomapi_meeting_topic_generate_for_entity($account, $entity, $entity_type, array $options = []) {
$entity_wrapper = entity_metadata_wrapper($entity_type, $entity);
$topic = $entity_wrapper
->label();
$context = [
'account' => $account,
'entity' => $entity,
'entity_type' => $entity_type,
'options' => $options,
];
drupal_alter('zoomapi_meeting_topic_for_entity', $topic, $context);
if (empty($topic)) {
$topic = zoomapi_meeting_topic_generate($account);
}
return $topic;
}