Repository URL to install this package:
|
Version:
2.0.2 ▾
|
<?php
use Drupal\Core\Routing\RouteMatchInterface;
/**
* Implements hook_theme().
*/
function dds_sendgrid_custom_forms_theme($existing, $type, $theme, $path) {
return [
'table__sendgrid_mail' => [
'base hook' => 'table',
],
];
}
/**
* Implements hook_help().
*/
function dds_sendgrid_custom_forms_help($route_name, RouteMatchInterface $route_match) {
switch ($route_name) {
case 'help.page.dds_sendgrid_custom_forms':
return 'Enables SendGrid mail functionality on custom forms.';
}
}
/**
* Implements hook_locale_translation_projects_alter().
*/
function dds_sendgrid_custom_forms_locale_translation_projects_alter(&$projects) {
$module_handler = \Drupal::service('module_handler');
$path = $module_handler->getModule('dds_sendgrid_custom_forms')->getPath();
$projects['dds_sendgrid_custom_forms']['info']['interface translation server pattern'] = $path.'/translations/%language.po';
}