function file_download_help in File Download 8
Implements hook_help().
File
- ./
file_download.module, line 22 - .
Code
function file_download_help($route_name, RouteMatchInterface $arg) {
switch ($route_name) {
case 'help.page.file_download':
$output = file_get_contents(drupal_get_path('module', 'file_download') . '/README.md');
return \Drupal::moduleHandler()
->moduleExists('markdown') ? Xss::filterAdmin(\Drupal::moduleHandler()
->invoke('markdown', 'filter', [
'process',
0,
-1,
$output,
])) : '<h3>file_download README</h3><pre>' . Html::escape($output) . '</pre>';
}
}