responsivewrappers.module in Responsive wrappers 8
Same filename and directory in other branches
Module file for responsivewrappers.
File
responsivewrappers.moduleView source
<?php
/**
* @file
* Module file for responsivewrappers.
*/
use Drupal\Core\Routing\RouteMatchInterface;
/**
* Implements hook_help().
*
* @inheritdoc
*/
function responsivewrappers_help($route_name, RouteMatchInterface $route_match) {
switch ($route_name) {
case 'help.page.responsivewrappers':
$text = file_get_contents(dirname(__FILE__) . '/README.md');
if (!\Drupal::moduleHandler()
->moduleExists('markdown')) {
$output = '<pre>' . $text . '</pre>';
}
else {
// Use the Markdown filter to render the README.
$settings = \Drupal::configFactory()
->get('markdown.settings')
->getRawData();
$filter = \Drupal::service('plugin.manager.filter')
->createInstance('markdown', [
'settings' => $settings,
]);
$output = $filter
->process($text, 'en');
}
return $output;
}
}
Functions
Name | Description |
---|---|
responsivewrappers_help | Implements hook_help(). |