You are here

function search_by_page_search_info in Search by Page 8

Same name and namespace in other branches
  1. 7 search_by_page.module \search_by_page_search_info()

Implements hook_search_info().

File

./search_by_page.module, line 377
Main module file for Drupal module Search by Page.

Code

function search_by_page_search_info() {
  $name = \Drupal::state()
    ->get('search_by_page_tabname', t('Pages'));
  if (\Drupal::moduleHandler()
    ->moduleExists('i18n_string')) {
    $name = i18n_string_translate('search_by_page:search_page:tab_name', $name);
  }
  return [
    'title' => $name,
    // Note: Path here is not like a Drupal path, it's just the name of module.
    'path' => 'search_by_page',
  ];
}