_drupal_flush_css_js();
// Flush the cache of all data for the update status module.
$this->keyValueExpirableFactory->
get('update'
)->
deleteAll();
$this->keyValueExpirableFactory->
get('update_available_release'
)->
deleteAll();
$build['info_header'
] =
[ '#markup' => '<p>' .
$this->
t('Use this utility to update your database whenever a module, theme, or the core software is updated.'
) . '</p><p>' .
$this->
t('For more detailed information, see the <a href="https://www.drupal.org/upgrade">upgrading handbook</a>. If you are unsure what these terms mean you should probably contact your hosting provider.'
) . '</p>',
];
$info[] =
$this->
t("<strong>Back up your code</strong>. Hint: when backing up module code, do not leave that backup in the 'modules' or 'sites/*/modules' directories as this may confuse Drupal's auto-discovery mechanism."
);
// @todo Simplify with https://www.drupal.org/node/2548095
$base_url =
str_replace('/update.php', '',
$request->
getBaseUrl());
$info[] =
$this->
t('Put your site into <a href=":url">maintenance mode</a>.',
[ ':url' => Url::
fromRoute('system.site_maintenance_mode'
)->
setOption('base_url',
$base_url)->
toString(TRUE
)->
getGeneratedUrl(),
]);
$info[] =
$this->
t('<strong>Back up your database</strong>. This process will change your database values and in case of emergency you may need to revert to a backup.'
);
$info[] =
$this->
t('Update your files (as described in the handbook page linked above).'
);
$build['info'
] =
[ '#theme' => 'item_list',
'#list_type' => 'ol',
'#items' =>
$info,
];
$build['info_footer'
] =
[