You are here

mail_edit.module in Mail Editor 2.0.x

Primary hook implementations for the Mail Edit module.

File

mail_edit.module
View 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

Namesort descending Description
mail_edit_help Implements hook_help().
user_mail_edit_templates Implements hook_mail_edit_keys().