function commerce_kickstart_install_finished in Commerce Kickstart 3.x
Same name and namespace in other branches
- 7.2 commerce_kickstart.install \commerce_kickstart_install_finished()
Performs final installation steps and displays a 'finished' page.
Parameters
$install_state: An array of information about the current installation state.
1 string reference to 'commerce_kickstart_install_finished'
File
- ./
commerce_kickstart.install, line 86 - Install, update and uninstall functions for the commerce_base installation profile.
Code
function commerce_kickstart_install_finished(&$install_state) {
install_finished($install_state);
// Remove the Search API indexing messages, and all the other status messages.
$messenger = \Drupal::service('messenger');
$messenger
->deleteByType('status');
$warning_messages = $messenger
->deleteByType('warning');
$success_message = t('Congratulations, you installed @drupal!', [
'@drupal' => drupal_install_profile_distribution_name(),
]);
$messenger
->addMessage($success_message);
// Re-add the warning messages (after the installation success message).
foreach ($warning_messages as $warning_message) {
$messenger
->addMessage($warning_message, 'warning');
}
}