function opigno_moxtra_opigno_moxtra_meeting_insert in Opigno Moxtra 3.x
Same name and namespace in other branches
- 8 opigno_moxtra.module \opigno_moxtra_opigno_moxtra_meeting_insert()
Implements hook_ENTITY_TYPE_insert().
Updates the calendar event related to the live meeting.
File
- ./
opigno_moxtra.module, line 542 - Contains opigno_moxtra.module.
Code
function opigno_moxtra_opigno_moxtra_meeting_insert(EntityInterface $entity) {
if (!_opigno_moxtra_is_active()) {
return;
}
// Set meeting reference on the related calendar event.
/** @var \Drupal\opigno_moxtra\MeetingInterface $entity */
$calendar_event = $entity
->getCalendarEvent();
if (isset($calendar_event)) {
$calendar_event
->set('field_meeting', $entity);
$calendar_event
->save();
}
}