You are here

function bibcite_entity_help in Bibliography & Citation 8

Same name and namespace in other branches
  1. 2.0.x modules/bibcite_entity/bibcite_entity.module \bibcite_entity_help()

Implements hook_help().

File

modules/bibcite_entity/bibcite_entity.module, line 518
Module hooks.

Code

function bibcite_entity_help($route_name, RouteMatchInterface $route_match) {
  switch ($route_name) {
    case 'help.page.bibcite_entity':
      $links = [
        ':ref' => Url::fromRoute('bibcite_entity.reference.settings')
          ->toString(),
        ':ref_links' => Url::fromRoute('bibcite_entity.reference.settings.links')
          ->toString(),
        ':ref_types' => Url::fromRoute('entity.bibcite_reference_type.collection')
          ->toString(),
        ':contrib' => Url::fromRoute('bibcite_entity.contributor.settings')
          ->toString(),
        ':contrib_cat' => Url::fromRoute('entity.bibcite_contributor_category.collection')
          ->toString(),
        ':contrib_role' => Url::fromRoute('entity.bibcite_contributor_role.collection')
          ->toString(),
        ':csl_map' => Url::fromRoute('bibcite_entity.mapping', [
          'bibcite_format' => 'csl',
        ])
          ->toString(),
      ];
      $module = 'bibcite_entity';
      return \Drupal::service('bibcite.help_service')
        ->getHelpMarkup($links, $route_name, $module);
  }
}