mail_edit.module in Mail Editor 2.0.x
Same filename and directory in other branches
Primary hook implementations for the Mail Edit module.
File
mail_edit.moduleView source
<?php
/**
* @file
* Primary hook implementations for the Mail Edit module.
*/
use Drupal\Core\Routing\RouteMatchInterface;
/**
* Implements hook_help().
*/
function mail_edit_help($route_name, RouteMatchInterface $route_match) {
switch ($route_name) {
case 'help.page.mail_edit':
return '<p>' . t('Edit any of the emails which are defined throughout the site.') . '</p>';
}
}
/**
* Implements hook_mail_edit_keys().
*/
function user_mail_edit_templates() {
return [
'user.mail' => [
'register_no_approval_required' => t('Welcome message when user self-registers'),
'register_admin_created' => t('Welcome message for user created by the admin'),
'register_pending_approval' => t('Welcome message, user pending admin approval'),
'register_pending_approval_admin' => t('Message to admin, user is pending'),
'password_reset' => t('Password recovery request'),
'status_activated' => t('Account activated'),
'status_blocked' => t('Account blocked'),
'cancel_confirm' => t('Request to confirm cancellation'),
'status_canceled' => t('Account canceled'),
],
];
}
Functions
Name | Description |
---|---|
mail_edit_help | Implements hook_help(). |
user_mail_edit_templates | Implements hook_mail_edit_keys(). |