You are here

function yandex_metrics_help in Yandex.Metrics 8.3

Same name and namespace in other branches
  1. 8.2 yandex_metrics.module \yandex_metrics_help()
  2. 6.2 yandex_metrics.module \yandex_metrics_help()
  3. 6 yandex_metrics.module \yandex_metrics_help()
  4. 7.3 yandex_metrics.module \yandex_metrics_help()
  5. 7 yandex_metrics.module \yandex_metrics_help()
  6. 7.2 yandex_metrics.module \yandex_metrics_help()

Implements hook_help().

File

./yandex_metrics.module, line 132
The main code of Yandex.Metrics Counter module.

Code

function yandex_metrics_help($route_name, RouteMatchInterface $route_match) {
  switch ($route_name) {
    case 'help.page.yandex_metrics':
      $output = '';
      $output .= '<h3>' . t('About the module') . '</h3>';
      $output .= '<p>' . t('The Yandex.Metrics Counter module allows to install <a href="@yandex_metrika" target="_blank">Yandex.Metrics</a> counter code on the site pages.', array(
        '@yandex_metrika' => 'http://metrika.yandex.ru/',
      )) . '</p>';
      $output .= '<h3>' . t('Usage') . '</h3>';
      $output .= '<dl>';
      $output .= '<dt>' . t('Installing counter') . '</dt>';
      $output .= '<dd>' . t('Yandex.Metrics counter is JavaScript code that monitors user behavior on your website. You should <a href="@create_counter" target="_blank">create</a> and <a href="@install_counter">install</a> the counter to work with Yandex.Metrics service.', array(
        '@create_counter' => 'http://metrika.yandex.ru/',
        '@install_counter' => Url::fromRoute('yandex_metrics.default')
          ->toString(),
      )) . '</dd>';
      $output .= '</dl>';
      return $output;
    case 'yandex_metrics.default':
      $output = '<p>' . t('Yandex.Metrics counter is JavaScript code that monitors user behavior on your website. You should <a href="@create_counter" target="_blank">create</a> and install the counter code to work with Yandex.Metrics service.', array(
        '@create_counter' => 'http://metrika.yandex.ru/',
      )) . '</p>';
      return $output;
  }
}