Reverted some incorrect changes.

parent 9e6fac1f
......@@ -10,7 +10,7 @@
- [Drush](#drush)
## INTRODUCTION
## Introduction
Current Maintainer: [TravisCarden](https://www.drupal.org/u/traviscarden)
......@@ -19,13 +19,13 @@ persistent checklists that track progress with completion times and users. See
checklistapi_example.module for an example implementation.
## INSTALLATION
## Installation
Checklist API is installed in the usual way. See [Installing contributed
modules](https://www.drupal.org/documentation/install/modules-themes/modules-8).
## REQUIREMENTS & IMPLEMENTATIONS
## Implementation
Checklists are declared as multidimensional arrays using
`hook_checklistapi_checklist_info()`. They can be altered using
......@@ -33,8 +33,6 @@ Checklists are declared as multidimensional arrays using
menu items and permissions. Progress details are saved in one config file per
checklist.
## CONFIGURATION
See checklistapi.api.php for more details.
......
......@@ -301,23 +301,3 @@ function checklistapiexample_checklistapi_checklist_info_alter(&$definitions) {
],
];
}
/**
* Implements hook_help().
*/
function checklistapiexample_help($route_name, RouteMatchInterface $route_match) {
foreach (checklistapi_get_checklist_info() as $id => $definition) {
$checklist = new ChecklistapiChecklist($definition);
if ($checklist->getRouteName() == $route_name) {
// The checklist has help and the current user has access to view it.
if (!empty($definition['#help']) && checklistapi_checklist_access($id)) {
return $definition['#help'];
}
// Otherwise the loop can break early since only one checklist can occupy
// a given route.
else {
break;
}
}
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment