materio-d9/web/modules/custom/materio_expo/materio_expo.module

37 lines
873 B
Plaintext
Raw Normal View History

2021-09-07 00:50:12 +02:00
<?php
/**
* @file
* Contains materio_expo.module.
*/
use Drupal\Core\Routing\RouteMatchInterface;
/**
* Implements hook_help().
*/
function materio_expo_help($route_name, RouteMatchInterface $route_match) {
switch ($route_name) {
// Main module help for the materio_expo module.
case 'help.page.materio_expo':
$output = '';
$output .= '<h3>' . t('About') . '</h3>';
$output .= '<p>' . t('My Awesome Module') . '</p>';
return $output;
default:
}
}
/**
* Implements hook_mail().
*/
function materio_expo_mail($key, &$message, $params) {
switch ($key) {
case 'expo_getmail_submitted':
$message['from'] = \Drupal::config('system.site')->get('mail');
2021-09-08 15:11:59 +02:00
$message['subject'] = t('[EXPO] mail submitted: @mail', array('@mail' => $params['email']));
2021-09-07 00:50:12 +02:00
$message['body'][] = $params['message'];
break;
}
}