function commerce_shipping_weight_tariff_help in Commerce Shipping Weight Tariff 8
Same name and namespace in other branches
- 8.2 commerce_shipping_weight_tariff.module \commerce_shipping_weight_tariff_help()
Implements hook_help().
File
- ./
commerce_shipping_weight_tariff.module, line 28 - Contains Drupal hooks.
Code
function commerce_shipping_weight_tariff_help($route_name, RouteMatchInterface $route_match) {
switch ($route_name) {
// Main module help for the commerce_shipping_weight_tariff module.
case 'help.page.commerce_shipping_weight_tariff':
$path = __DIR__ . '/README.txt';
if (file_exists($path)) {
$readme = file_get_contents($path);
}
if (!isset($readme)) {
return NULL;
}
return '<pre>' . $readme . '</pre>';
}
}