Skip to content
Snippets Groups Projects

Issue #3332145: hook_help function missing in .module file

+ 34
0
@@ -5,6 +5,40 @@
@@ -5,6 +5,40 @@
* Framework for managing configuration updates from distributions.
* Framework for managing configuration updates from distributions.
*/
*/
 
use Drupal\Core\Link;
 
use Drupal\Core\Routing\RouteMatchInterface;
 
use Drupal\Core\Url;
 
 
/**
 
* Implements hook_help().
 
*/
 
function config_distro_help($route_name, RouteMatchInterface $route_match) {
 
switch ($route_name) {
 
// Main module help for the 'Config Distro' module.
 
case 'help.page.config_distro':
 
$output = '<h3>' . t('Usage') . '</h3>';
 
 
$output .= '<p>' . t('To use this module you should install one or more
 
modules that provide Config Filter plugins that integrate with this
 
module, such as Configuration Synchronizer.') . '</p>';
 
 
$output .= '<p>' . t('Update your installed modules or themes to new
 
versions that include configuration changes or updates. Run database
 
updates and clear caches.') . '</p>';
 
 
// Using Drupal's Url and Link classes for internal paths.
 
$distroUpdateUrl = Url::fromRoute('config_distro.import');
 
$distroUpdateLink = Link::fromTextAndUrl(t('Distribution Update'), $distroUpdateUrl)->toString();
 
 
$output .= '<p>' . t('If using the UI, navigate to Configuration >
 
Development > !distroUpdateLink (/admin/config/development/distro). Review and run updates', ['!distroUpdateLink' => $distroUpdateLink]) . '</p>';
 
 
$output .= '<p>' . t('If using Drush, use the Drush command config-distro-update to run imports.') . '</p>';
 
 
return $output;
 
}
 
}
 
/**
/**
* Implements hook_batch_alter().
* Implements hook_batch_alter().
*
*
Loading