obfuscate_email.module in Obfuscate Email 8
Contains obfuscate_email_field.module.
File
obfuscate_email.moduleView source
<?php
/**
* @file
* Contains obfuscate_email_field.module.
*/
use Drupal\Core\Routing\RouteMatchInterface;
/**
* Implements hook_help().
*/
function obfuscate_email_help($route_name, RouteMatchInterface $route_match) {
switch ($route_name) {
// Main module help for the obfuscate_email_field module.
case 'help.page.obfuscate_email':
$output = '';
$output .= '<h3>' . t('About') . '</h3>';
$output .= '<p>' . t('Twig Template to obfuscate a <code>field_email</code>.') . '</p>';
return $output;
default:
}
}
/**
* Implements hook_theme().
*/
function obfuscate_email_theme() {
$theme = [
'field__email' => [
'base hook' => 'field',
'template' => 'field--email',
],
];
return $theme;
}
/**
* Implements hook_page_attachments_alter().
*/
function obfuscate_email_page_attachments_alter(&$page) {
$page['#attached']['library'][] = 'obfuscate_email/default';
}
Functions
Name | Description |
---|---|
obfuscate_email_help | Implements hook_help(). |
obfuscate_email_page_attachments_alter | Implements hook_page_attachments_alter(). |
obfuscate_email_theme | Implements hook_theme(). |