function file_download_counter_help in File Download 8
Implements hook_help().
File
- modules/
file_download_counter/ file_download_counter.module, line 14 - Logs and displays content file_download_counter for a site.
Code
function file_download_counter_help($route_name, RouteMatchInterface $route_match) {
switch ($route_name) {
case 'help.page.file_download_counter':
$output = file_get_contents(drupal_get_path('module', 'file_download_counter') . '/README.md');
return \Drupal::moduleHandler()
->moduleExists('markdown') ? \Drupal\Component\Utility\Xss::filterAdmin(\Drupal::moduleHandler()
->invoke('markdown', 'filter', [
'process',
0,
-1,
$output,
])) : '<h3>file_download README</h3><pre>' . \Drupal\Component\Utility\Html::escape($output) . '</pre>';
}
}