You are here

function uc_catalog_help in Ubercart 8.4

Same name and namespace in other branches
  1. 7.3 uc_catalog/uc_catalog.module \uc_catalog_help()

Implements hook_help().

File

uc_catalog/uc_catalog.module, line 27
Ubercart Catalog module.

Code

function uc_catalog_help($route_name, RouteMatchInterface $route_match) {
  switch ($route_name) {
    case 'uc_catalog.orphans':
      return '<p>' . t('Orphaned products are products that you have created but not yet assigned to a category in your product catalog. All such products will appear as links below that you can follow to edit the product listings to assign them to categories.') . '</p>';
    case 'uc_catalog.settings':
      if (!\Drupal::moduleHandler()
        ->moduleExists('views_ui')) {
        return '<p>' . t('<a href=":modules">Enable the Views UI module</a> to edit the catalog display.', [
          ':modules' => Url::fromRoute('system.modules_list', [], [
            'fragment' => 'edit-modules-views',
          ])
            ->toString(),
        ]) . '</p>';
      }
      break;
  }
}