autocomplete_deluxe.module in Autocomplete Deluxe 2.0.x
Same filename and directory in other branches
The Autocomplete Deluxe module improves autocomplete fields using JQuery UI.
File
autocomplete_deluxe.moduleView source
<?php
/**
* @file
* The Autocomplete Deluxe module improves autocomplete fields using JQuery UI.
*/
use Drupal\Core\Routing\RouteMatchInterface;
/**
* Implements hook_help().
*
* @inheritdoc
*/
function autocomplete_deluxe_help($route_name, RouteMatchInterface $route_match) {
switch ($route_name) {
case 'help.page.autocomplete_deluxe':
$text = file_get_contents(dirname(__FILE__) . "/README.txt");
if (!\Drupal::moduleHandler()
->moduleExists('markdown')) {
$output = '<pre>' . $text . '</pre>';
}
else {
// Use the Markdown filter to render the README.
$filter_manager = \Drupal::service('plugin.manager.filter');
$settings = \Drupal::configFactory()
->get('markdown.settings')
->getRawData();
$config = [
'settings' => $settings,
];
$filter = $filter_manager
->createInstance('markdown', $config);
$output = $filter
->process($text, 'en');
}
return $output;
}
}
Functions
Name | Description |
---|---|
autocomplete_deluxe_help | Implements hook_help(). |