You are here

function uc_store_help in Ubercart 8.4

Same name and namespace in other branches
  1. 5 uc_store/uc_store.module \uc_store_help()
  2. 6.2 uc_store/uc_store.module \uc_store_help()
  3. 7.3 uc_store/uc_store.module \uc_store_help()

Implements hook_help().

File

uc_store/uc_store.module, line 200
Contains global Ubercart functions and store administration functionality.

Code

function uc_store_help($route_name, RouteMatchInterface $route_match) {
  switch ($route_name) {
    case 'help.page.uc_store':
      $output = '<h3>' . t('Ubercart') . '</h3>';
      $output .= '<p>' . t('Use the following links to find documentation and support:') . '</p>';
      $output .= '<ul>';
      $output .= '<li>' . Link::fromTextAndUrl(t("Ubercart User's Guide"), Url::fromUri('https://www.drupal.org/docs/8/modules/ubercart'))
        ->toString() . '</li>';
      $output .= '<li>' . Link::fromTextAndUrl(t('Support Forums'), Url::fromUri('http://www.ubercart.org/forum'))
        ->toString() . '</li>';
      $output .= '</ul>';
      return $output;
    case 'uc_store.reports':
      $output = '<p>' . t('Various reports generated by Ubercart modules may be found on this page. Click the links below to view the reports.') . '</p>';
      if (!\Drupal::moduleHandler()
        ->moduleExists('uc_report')) {
        $output .= '<p>' . t('To view core Ubercart statistics enable the <strong>Report</strong> module on the <a href=":url">module administration page</a>.', [
          ':url' => Url::fromRoute('system.modules_list', [], [
            'fragment' => 'edit-modules-ubercart-core-optional',
          ])
            ->toString(),
        ]) . '</p>';
      }
      return $output;
  }
}