Loading src/Services/VirtualEventsCommonService.php +4 −4 Original line number Diff line number Diff line Loading @@ -32,17 +32,17 @@ class VirtualEventsCommonService { } /** * Get event entity using the refernced entity. * Get event entity using the referenced entity. * * @param string $entity_type * Refernced Entity Type. * Referenced Entity Type. * @param string $entity_id * Refernced Entity Id. * Referenced Entity Id. * * @return \Drupal\virtual_events\Entity\VirtualEventsEventEntity|bool * The event Entity if found or false if not found */ public function getEventByRefernce($entity_type, $entity_id) { public function getEventByReference($entity_type, $entity_id) { $query = \Drupal::entityQuery('virtual_events_event_entity') ->condition('eventEntityReferenceType', $entity_type) ->condition('eventEntityReference', $entity_id); Loading virtual_events.module +4 −4 Original line number Diff line number Diff line Loading @@ -23,7 +23,7 @@ function virtual_events_entity_delete(EntityInterface $entity) { $entity_bundle = $entity->bundle(); $entity_id = $entity->id(); if ($virtualEventsCommon->isVirtualEventsEvent($entity_bundle)) { $event = $virtualEventsCommon->getEventByRefernce($entity_type, $entity_id); $event = $virtualEventsCommon->getEventByReference($entity_type, $entity_id); if ($event) { $eventSourcePlugin = $event->getEventSourcePlugin(); $eventSourcePlugin->deleteMeeting($event); Loading Loading @@ -90,7 +90,7 @@ function virtual_events_form_alter(&$form, FormStateInterface $form_state, $form $entity_type = $entity->getEntityTypeId(); $entity_bundle = $entity->bundle(); $entity_id = $entity->id(); $event = $virtualEventsCommon->getEventByRefernce($entity_type, $entity_id); $event = $virtualEventsCommon->getEventByReference($entity_type, $entity_id); $event_source_data = []; $enabled_source = ""; Loading Loading @@ -226,7 +226,7 @@ function virtual_events_event_form_submit(array $form, FormStateInterface $form_ $entity_bundle = $entity->bundle(); $entity_id = $entity->id(); $eventConfig = $virtualEventsCommon->getVirtualEventsConfig($entity_bundle); $event = $virtualEventsCommon->getEventByRefernce($entity_type, $entity_id); $event = $virtualEventsCommon->getEventByReference($entity_type, $entity_id); $event_id = $entity_bundle . "_" . $entity->uuid(); if(!$event_id){ $event_id = $entity_bundle . "_" . time() . "_" . $entity_id; Loading Loading @@ -338,7 +338,7 @@ function virtual_events_entity_view(array &$build, EntityInterface $entity, Enti $virtualEventsCommon = \Drupal::service('virtual_events.common'); $virtualEventsSourcePluginManager = \Drupal::service('plugin.manager.virtual_event_source_plugin'); $eventConfig = $virtualEventsCommon->getVirtualEventsConfig($entity_bundle); $event = $virtualEventsCommon->getEventByRefernce($entity_type, $entity_id); $event = $virtualEventsCommon->getEventByReference($entity_type, $entity_id); $virtualEventsFormatterPluginManager = \Drupal::service('plugin.manager.virtual_event_formatter_plugin'); $formatters = $virtualEventsFormatterPluginManager->getDefinitions(); $virtualEventsPrePluginManager = \Drupal::service('plugin.manager.virtual_event_pre_handle_plugin'); Loading Loading
src/Services/VirtualEventsCommonService.php +4 −4 Original line number Diff line number Diff line Loading @@ -32,17 +32,17 @@ class VirtualEventsCommonService { } /** * Get event entity using the refernced entity. * Get event entity using the referenced entity. * * @param string $entity_type * Refernced Entity Type. * Referenced Entity Type. * @param string $entity_id * Refernced Entity Id. * Referenced Entity Id. * * @return \Drupal\virtual_events\Entity\VirtualEventsEventEntity|bool * The event Entity if found or false if not found */ public function getEventByRefernce($entity_type, $entity_id) { public function getEventByReference($entity_type, $entity_id) { $query = \Drupal::entityQuery('virtual_events_event_entity') ->condition('eventEntityReferenceType', $entity_type) ->condition('eventEntityReference', $entity_id); Loading
virtual_events.module +4 −4 Original line number Diff line number Diff line Loading @@ -23,7 +23,7 @@ function virtual_events_entity_delete(EntityInterface $entity) { $entity_bundle = $entity->bundle(); $entity_id = $entity->id(); if ($virtualEventsCommon->isVirtualEventsEvent($entity_bundle)) { $event = $virtualEventsCommon->getEventByRefernce($entity_type, $entity_id); $event = $virtualEventsCommon->getEventByReference($entity_type, $entity_id); if ($event) { $eventSourcePlugin = $event->getEventSourcePlugin(); $eventSourcePlugin->deleteMeeting($event); Loading Loading @@ -90,7 +90,7 @@ function virtual_events_form_alter(&$form, FormStateInterface $form_state, $form $entity_type = $entity->getEntityTypeId(); $entity_bundle = $entity->bundle(); $entity_id = $entity->id(); $event = $virtualEventsCommon->getEventByRefernce($entity_type, $entity_id); $event = $virtualEventsCommon->getEventByReference($entity_type, $entity_id); $event_source_data = []; $enabled_source = ""; Loading Loading @@ -226,7 +226,7 @@ function virtual_events_event_form_submit(array $form, FormStateInterface $form_ $entity_bundle = $entity->bundle(); $entity_id = $entity->id(); $eventConfig = $virtualEventsCommon->getVirtualEventsConfig($entity_bundle); $event = $virtualEventsCommon->getEventByRefernce($entity_type, $entity_id); $event = $virtualEventsCommon->getEventByReference($entity_type, $entity_id); $event_id = $entity_bundle . "_" . $entity->uuid(); if(!$event_id){ $event_id = $entity_bundle . "_" . time() . "_" . $entity_id; Loading Loading @@ -338,7 +338,7 @@ function virtual_events_entity_view(array &$build, EntityInterface $entity, Enti $virtualEventsCommon = \Drupal::service('virtual_events.common'); $virtualEventsSourcePluginManager = \Drupal::service('plugin.manager.virtual_event_source_plugin'); $eventConfig = $virtualEventsCommon->getVirtualEventsConfig($entity_bundle); $event = $virtualEventsCommon->getEventByRefernce($entity_type, $entity_id); $event = $virtualEventsCommon->getEventByReference($entity_type, $entity_id); $virtualEventsFormatterPluginManager = \Drupal::service('plugin.manager.virtual_event_formatter_plugin'); $formatters = $virtualEventsFormatterPluginManager->getDefinitions(); $virtualEventsPrePluginManager = \Drupal::service('plugin.manager.virtual_event_pre_handle_plugin'); Loading