function viewsreference_help in Views Reference Field 8
Same name and namespace in other branches
- 8.2 viewsreference.module \viewsreference_help()
Implements hook_help().
File
- ./
viewsreference.module, line 16 - Module functions for viewsreference.
Code
function viewsreference_help($route_name, RouteMatchInterface $arg) {
switch ($route_name) {
case 'help.page.viewsreference':
$output = file_get_contents(drupal_get_path('module', 'viewsreference') . '/README.md');
$output = \Drupal::moduleHandler()
->moduleExists('markdown') ? Xss::filterAdmin(\Drupal::moduleHandler()
->invoke('markdown', 'filter', [
'process',
0,
-1,
$output,
])) : '<h3>viewsreference README</h3><pre>' . Html::escape($output) . '</pre>';
return $output;
}
}