Skip to content

Commit

Permalink
ACMS-4431: Conditional check to handle the googleMapApiKeyForm existe…
Browse files Browse the repository at this point in the history
…nce.
  • Loading branch information
apathak18 committed Jan 13, 2025
1 parent 75e2925 commit 560a9a3
Showing 1 changed file with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,14 @@ function acquia_cms_development_install($is_syncing) {
// key.So when user visit the content page of place content type, this
// won't show the modal popup error i.e The Google Map cannot be loaded.
// @see \Drupal\cohesion\Form\GoogleMapApiKeyForm
$form = \Drupal::formBuilder()->getForm('\Drupal\cohesion\Form\GoogleMapApiKeyForm');
$form_state = new FormState();
$values['google_map_api_key'] = $gmaps_key;
$form_state->setValues($values);
\Drupal::classResolver(GoogleMapApiKeyForm::class)->submitForm($form, $form_state);
if (\Drupal::moduleHandler()->moduleExists('cohesion') && class_exists(GoogleMapApiKeyForm::class)) {
$form = \Drupal::formBuilder()->getForm('\Drupal\cohesion\Form\GoogleMapApiKeyForm');
$form_state = new FormState();
$values['google_map_api_key'] = $gmaps_key;
$form_state->setValues($values);
\Drupal::classResolver(GoogleMapApiKeyForm::class)->submitForm($form, $form_state);
}

}

/**
Expand Down

0 comments on commit 560a9a3

Please sign in to comment.