expo qr code to get visitors email
This commit is contained in:
37
web/modules/custom/materio_expo/materio_expo.module
Normal file
37
web/modules/custom/materio_expo/materio_expo.module
Normal file
@@ -0,0 +1,37 @@
|
||||
<?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');
|
||||
$message['subject'] = t('[EXPO] mail submitted: @mail', array('@mail' => $params['mail']));
|
||||
$message['body'][] = $params['message'];
|
||||
break;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user