Loading email_blocker.info.yml +1 −2 Original line number Diff line number Diff line name: 'Email Blocker' type: module description: 'Email Blocker blocks all outgoing emails based on the configuration setting.' core: 8.x core_version_requirement: ^8 || ^9 core_version_requirement: ^8.8 || ^9 configure : email_blocker.email_blocker_settings_form package: 'Mail' email_blocker.module +2 −2 Original line number Diff line number Diff line Loading @@ -32,7 +32,7 @@ function email_blocker_mail_alter(&$message) { $message['send'] = FALSE; } if ($config->get('block_email_display_email') != FALSE) { print_r($message['body']); exit; // Logs the email message object as a JSON in recent log messages. \Drupal::logger('email_blocker')->notice(json_encode($message)); } } email_blocker.services.ymldeleted 100644 → 0 +0 −5 Original line number Diff line number Diff line services: email_blocker.subscriber: class: Drupal\email_blocker\EventSubscriber\SiteExit tags: - {name: event_subscriber} src/EventSubscriber/SiteExit.phpdeleted 100644 → 0 +0 −30 Original line number Diff line number Diff line <?php namespace Drupal\email_blocker\EventSubscriber; use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpKernel\Event\ResponseEvent; use Symfony\Component\HttpKernel\KernelEvents; class SiteExit implements EventSubscriberInterface { public function terminate(ResponseEvent $event) { /* $response = $event->getResponse(); if (!headers_sent()) { foreach (headers_list() as $header) header_remove($header); } */ } /** * {@inheritdoc} */ public static function getSubscribedEvents() { $events[KernelEvents::RESPONSE][] = array('terminate'); return $events; } } src/Form/EmailBlockerSettingsForm.php +2 −2 Original line number Diff line number Diff line Loading @@ -6,7 +6,7 @@ use Drupal\Core\Form\ConfigFormBase; use Drupal\Core\Form\FormStateInterface; /** * Class EmailBlockerSettingsForm. * Class which provides the settings form for the module. */ class EmailBlockerSettingsForm extends ConfigFormBase { Loading Loading
email_blocker.info.yml +1 −2 Original line number Diff line number Diff line name: 'Email Blocker' type: module description: 'Email Blocker blocks all outgoing emails based on the configuration setting.' core: 8.x core_version_requirement: ^8 || ^9 core_version_requirement: ^8.8 || ^9 configure : email_blocker.email_blocker_settings_form package: 'Mail'
email_blocker.module +2 −2 Original line number Diff line number Diff line Loading @@ -32,7 +32,7 @@ function email_blocker_mail_alter(&$message) { $message['send'] = FALSE; } if ($config->get('block_email_display_email') != FALSE) { print_r($message['body']); exit; // Logs the email message object as a JSON in recent log messages. \Drupal::logger('email_blocker')->notice(json_encode($message)); } }
email_blocker.services.ymldeleted 100644 → 0 +0 −5 Original line number Diff line number Diff line services: email_blocker.subscriber: class: Drupal\email_blocker\EventSubscriber\SiteExit tags: - {name: event_subscriber}
src/EventSubscriber/SiteExit.phpdeleted 100644 → 0 +0 −30 Original line number Diff line number Diff line <?php namespace Drupal\email_blocker\EventSubscriber; use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpKernel\Event\ResponseEvent; use Symfony\Component\HttpKernel\KernelEvents; class SiteExit implements EventSubscriberInterface { public function terminate(ResponseEvent $event) { /* $response = $event->getResponse(); if (!headers_sent()) { foreach (headers_list() as $header) header_remove($header); } */ } /** * {@inheritdoc} */ public static function getSubscribedEvents() { $events[KernelEvents::RESPONSE][] = array('terminate'); return $events; } }
src/Form/EmailBlockerSettingsForm.php +2 −2 Original line number Diff line number Diff line Loading @@ -6,7 +6,7 @@ use Drupal\Core\Form\ConfigFormBase; use Drupal\Core\Form\FormStateInterface; /** * Class EmailBlockerSettingsForm. * Class which provides the settings form for the module. */ class EmailBlockerSettingsForm extends ConfigFormBase { Loading