Commit 3b6ae7a1 authored by Thiago Pereira's avatar Thiago Pereira Committed by Paul Mrvik
Browse files

Issue #3265791: Fix typo in the public method name of VirtualEventsCommonService

parent 5e29acad
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -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);
+4 −4
Original line number Diff line number Diff line
@@ -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);
@@ -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 = "";
@@ -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;
@@ -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');