Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Jeli 93] Fix deprecated function error with Reload Core #198

Merged
merged 11 commits into from
Nov 18, 2024
5 changes: 3 additions & 2 deletions search_api_pantheon.module
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ function search_api_pantheon_form_alter(&$form, &$form_state, $form_id) {

function search_api_pantheon_form_submit($form, &$form_state) {
$rl = \Drupal::service("search_api_pantheon.reload");
$messenger = \Drupal::service("messenger");
$rl->reloadServer() ?
drupal_set_message(t('Core reloaded successfully.')) :
drupal_set_message(t('Core reload failed.'), 'error');
$messenger->addStatus(t('Core reloaded successfully.')) :
$messenger->addError(t('Core reload failed.'));
}
Loading