install_finished(&$install_state)
Performs final installation steps and displays a 'finished' page.
Parameters
$install_state: An array of information about the current installation state.
Return value
A message informing the user that the installation is complete.
File
- core/includes/install.core.inc, line 1747
- API functions for installing Drupal.
Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | function install_finished(& $install_state ) { $profile = drupal_get_profile(); // Installation profiles are always loaded last. module_set_weight( $profile , 1000); // Build the router once after installing all modules. // This would normally happen upon KernelEvents::TERMINATE, but since the // installer does not use an HttpKernel, that event is never triggered. \Drupal::service( 'router.builder' )->rebuild(); // Run cron to populate update status tables (if available) so that users // will be warned if they've installed an out of date Drupal version. // Will also trigger indexing of profile-supplied content or feeds. \Drupal::service( 'cron' )->run(); if ( $install_state [ 'interactive' ]) { // Load current user and perform final login tasks. // This has to be done after drupal_flush_all_caches() // to avoid session regeneration. $account = User::load(1); user_login_finalize( $account ); } $success_message = t( 'Congratulations, you installed @drupal!' , array ( '@drupal' => drupal_install_profile_distribution_name(), )); drupal_set_message( $success_message ); } |
Please login to continue.