function mailchimp_events_help in Mailchimp 2.x
Implements hook_help().
File
- modules/
mailchimp_events/ mailchimp_events.module, line 13 - Contains mailchimp_events.module.
Code
function mailchimp_events_help($route_name, RouteMatchInterface $route_match) {
switch ($route_name) {
// Main module help for the mailchimp_events module.
case 'help.page.mailchimp_events':
$module_handler = \Drupal::service('module_handler');
$module_path = $module_handler
->getModule('mailchimp_events')
->getPath();
$output = '';
$output .= '<h3>' . t('About') . '</h3>';
$output .= '<p>' . t('Adds ability to get and post Events to an audience member''s feed.') . '</p>';
$output .= '<p>' . t("More information found in the module's README.md file (included below).") . '</p>';
$output .= '<h3>' . t('Readme') . '</h3>';
$output .= '<pre>' . file_get_contents($module_path . '/README.md') . '</pre>';
return $output;
case 'entity.mailchimp_event.collection':
return t('
<p>Event types represent custom <a href=":behavioral_targeting_documentation_url" target="_blank">Mailchimp events</a> you want to create.</p>
<p>Once an event type is listed here, Drupal can create it in Mailchimp, usually through a <a href=":webform_handler_documentation_url" target="_blank">webform handler</a>, or custom code.</p>
<p>Events are not imported from Mailchimp.</p>', [
':behavioral_targeting_documentation_url' => 'https://mailchimp.com/help/use-events-behavioral-targeting/',
':webform_handler_documentation_url' => 'https://www.drupal.org/docs/8/modules/webform/webform-features#s-emails-handlers',
]);
default:
}
}