You are here

function upgrade_status_help in Upgrade Status 8.2

Same name and namespace in other branches
  1. 8.3 upgrade_status.module \upgrade_status_help()
  2. 8 upgrade_status.module \upgrade_status_help()
  3. 5 upgrade_status.module \upgrade_status_help()
  4. 6 upgrade_status.module \upgrade_status_help()
  5. 7 upgrade_status.module \upgrade_status_help()

Implements hook_help().

File

./upgrade_status.module, line 9

Code

function upgrade_status_help($route_name, RouteMatchInterface $route_match) {
  if ($route_name == 'upgrade_status.report') {

    // If neither Composer Deploy nor Git Deploy are installed, suggest installing one.
    $deploy_help = '';
    $modules = \Drupal::service('extension.list.module')
      ->getAllInstalledInfo();
    if (!isset($modules['git_deploy']) && !isset($modules['composer_deploy'])) {
      $deploy_help = ' ' . t('Install <a href=":composer_deploy">Composer Deploy</a> or <a href=":git_deploy">Git Deploy</a> as appropriate for more accurate custom vs. contributed categorization and better available update recommendations.', [
        ':composer_deploy' => 'https://drupal.org/project/composer_deploy',
        ':git_deploy' => 'https://drupal.org/project/git_deploy',
      ]);
    }
    return '<p>' . t('Analyze your site\'s Drupal 9 readiness. Run the report to find out if there are detectable compatibility errors with the modules and themes installed on your site. <a href=":prepare">Read more about preparing your site for Drupal 9</a>.', [
      ':prepare' => 'https://www.drupal.org/docs/9/how-to-prepare-your-drupal-7-or-8-site-for-drupal-9/prepare-a-drupal-8-site-for-drupal-9',
    ]) . $deploy_help . '</p>';
  }
}