Skip to content
Snippets Groups Projects
Commit dd16a214 authored by Florent Torregrosa's avatar Florent Torregrosa
Browse files

Issue #3479081 by grimreaper: Add a log in installation steps

parent 1baace58
Branches
Tags
1 merge request!22Issue #3479081 by grimreaper: Add a log in installation steps
Pipeline #307520 passed
......@@ -48,12 +48,17 @@ function sobki_profile_bootstrap_enable_default_content(array &$install_state):
* An array of information about the current installation state.
*/
function sobki_profile_bootstrap_set_front_page(array &$install_state): void {
$uuid = '5606505e-cd84-426f-8aee-d56ef86e8935';
$nodes = \Drupal::entityTypeManager()->getStorage('node')
->loadByProperties([
'uuid' => '5606505e-cd84-426f-8aee-d56ef86e8935',
'uuid' => $uuid,
]);
if (empty($nodes)) {
\Drupal::logger('sobki_profile_bootstrap')
->warning('The node with the UUID @uuid cannot be found. Impossible to set it as front page.', [
'@uuid' => $uuid,
]);
return;
}
......@@ -62,5 +67,5 @@ function sobki_profile_bootstrap_set_front_page(array &$install_state): void {
\Drupal::configFactory()->getEditable('system.site')
->set('page.front', '/node/' . $node->id())
->save(TRUE);
->save();
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment