Loading src/EmailFactory.php +5 −0 Changes for src/EmailFactory.php: 5 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -94,6 +94,7 @@ class EmailFactory implements EmailFactoryInterface { // Load builders with matching ID. foreach ($email->getSuggestions('', '.') as $plugin_id) { if ($this->emailBuilderManager->hasDefinition($plugin_id)) { /** @var \Drupal\symfony_mailer\Processor\EmailBuilderInterface $builder */ $builder = $this->emailBuilderManager->createInstance($plugin_id); if (empty($created)) { $builder->createParams($email, ...$params); Loading Loading @@ -127,6 +128,10 @@ class EmailFactory implements EmailFactoryInterface { * * @param \Drupal\symfony_mailer\EmailInterface $email * The email. * * @see hook_mailer_PHASE() * @see hook_mailer_TYPE_PHASE() * @see hook_mailer_TYPE__SUBTYPE_PHASE() */ public function invokeHooks(EmailInterface $email) { $name = EmailInterface::PHASE_NAMES[$email->getPhase()]; Loading src/EmailInterface.php +8 −0 Changes for src/EmailInterface.php: 8 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -27,6 +27,8 @@ interface EmailInterface extends BaseEmailInterface { * Must not trigger any rendering because cannot yet rely on the correct * language, theme, and account. For example, must not cast a translatable * string into a plain string, or replace tokens. * * @see \Drupal\symfony_mailer\Processor\EmailProcessorInterface::build() */ const PHASE_BUILD = 1; Loading @@ -35,6 +37,8 @@ interface EmailInterface extends BaseEmailInterface { * * Not normally needed. Only if there is a rendering step that needs to be * done before the main rendering call. * * @see \Drupal\symfony_mailer\Processor\EmailProcessorInterface::preRender() */ const PHASE_PRE_RENDER = 2; Loading @@ -42,11 +46,15 @@ interface EmailInterface extends BaseEmailInterface { * Post-render phase: adjusting of rendered output. * * Act on the rendered HTML, or any header. * * @see \Drupal\symfony_mailer\Processor\EmailProcessorInterface::postRender() */ const PHASE_POST_RENDER = 3; /** * Post-send phase: no further alterations allowed. * * @see \Drupal\symfony_mailer\Processor\EmailProcessorInterface::postSend() */ const PHASE_POST_SEND = 4; Loading src/Mailer.php +4 −0 Changes for src/Mailer.php: 4 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -161,6 +161,7 @@ class Mailer implements MailerInterface { */ public function doSend(InternalEmailInterface $email) { // Process the build phase. // @see \Drupal\symfony_mailer\EmailInterface::PHASE_BUILD $email->process(); // Do switching. Loading Loading @@ -202,12 +203,14 @@ class Mailer implements MailerInterface { try { // Process the pre-render phase. // @see \Drupal\symfony_mailer\EmailInterface::PHASE_PRE_RENDER $email->process(); // Render. $email->render(); // Process the post-render phase. // @see \Drupal\symfony_mailer\EmailInterface::PHASE_POST_RENDER $email->process(); } finally { Loading Loading @@ -265,6 +268,7 @@ class Mailer implements MailerInterface { } // Process the post-send phase. // @see \Drupal\symfony_mailer\EmailInterface::PHASE_POST_SEND $email->process(); return $result; Loading src/Processor/EmailAdjusterBase.php +1 −1 Changes for src/Processor/EmailAdjusterBase.php: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -7,7 +7,7 @@ use Drupal\Core\Form\FormStateInterface; /** * Defines the base class for EmailAdjuster plug-ins. */ class EmailAdjusterBase extends EmailProcessorBase implements EmailAdjusterInterface { abstract class EmailAdjusterBase extends EmailProcessorBase implements EmailAdjusterInterface { /** * The default weight for an email adjuster. Loading src/Processor/EmailBuilderBase.php +1 −1 Changes for src/Processor/EmailBuilderBase.php: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -8,7 +8,7 @@ use Drupal\symfony_mailer\EmailInterface; /** * Defines the base class for EmailBuilder plug-ins. */ class EmailBuilderBase extends EmailProcessorBase implements EmailBuilderInterface { abstract class EmailBuilderBase extends EmailProcessorBase implements EmailBuilderInterface { /** * The default weight for an email builder. Loading Loading
src/EmailFactory.php +5 −0 Changes for src/EmailFactory.php: 5 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -94,6 +94,7 @@ class EmailFactory implements EmailFactoryInterface { // Load builders with matching ID. foreach ($email->getSuggestions('', '.') as $plugin_id) { if ($this->emailBuilderManager->hasDefinition($plugin_id)) { /** @var \Drupal\symfony_mailer\Processor\EmailBuilderInterface $builder */ $builder = $this->emailBuilderManager->createInstance($plugin_id); if (empty($created)) { $builder->createParams($email, ...$params); Loading Loading @@ -127,6 +128,10 @@ class EmailFactory implements EmailFactoryInterface { * * @param \Drupal\symfony_mailer\EmailInterface $email * The email. * * @see hook_mailer_PHASE() * @see hook_mailer_TYPE_PHASE() * @see hook_mailer_TYPE__SUBTYPE_PHASE() */ public function invokeHooks(EmailInterface $email) { $name = EmailInterface::PHASE_NAMES[$email->getPhase()]; Loading
src/EmailInterface.php +8 −0 Changes for src/EmailInterface.php: 8 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -27,6 +27,8 @@ interface EmailInterface extends BaseEmailInterface { * Must not trigger any rendering because cannot yet rely on the correct * language, theme, and account. For example, must not cast a translatable * string into a plain string, or replace tokens. * * @see \Drupal\symfony_mailer\Processor\EmailProcessorInterface::build() */ const PHASE_BUILD = 1; Loading @@ -35,6 +37,8 @@ interface EmailInterface extends BaseEmailInterface { * * Not normally needed. Only if there is a rendering step that needs to be * done before the main rendering call. * * @see \Drupal\symfony_mailer\Processor\EmailProcessorInterface::preRender() */ const PHASE_PRE_RENDER = 2; Loading @@ -42,11 +46,15 @@ interface EmailInterface extends BaseEmailInterface { * Post-render phase: adjusting of rendered output. * * Act on the rendered HTML, or any header. * * @see \Drupal\symfony_mailer\Processor\EmailProcessorInterface::postRender() */ const PHASE_POST_RENDER = 3; /** * Post-send phase: no further alterations allowed. * * @see \Drupal\symfony_mailer\Processor\EmailProcessorInterface::postSend() */ const PHASE_POST_SEND = 4; Loading
src/Mailer.php +4 −0 Changes for src/Mailer.php: 4 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -161,6 +161,7 @@ class Mailer implements MailerInterface { */ public function doSend(InternalEmailInterface $email) { // Process the build phase. // @see \Drupal\symfony_mailer\EmailInterface::PHASE_BUILD $email->process(); // Do switching. Loading Loading @@ -202,12 +203,14 @@ class Mailer implements MailerInterface { try { // Process the pre-render phase. // @see \Drupal\symfony_mailer\EmailInterface::PHASE_PRE_RENDER $email->process(); // Render. $email->render(); // Process the post-render phase. // @see \Drupal\symfony_mailer\EmailInterface::PHASE_POST_RENDER $email->process(); } finally { Loading Loading @@ -265,6 +268,7 @@ class Mailer implements MailerInterface { } // Process the post-send phase. // @see \Drupal\symfony_mailer\EmailInterface::PHASE_POST_SEND $email->process(); return $result; Loading
src/Processor/EmailAdjusterBase.php +1 −1 Changes for src/Processor/EmailAdjusterBase.php: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -7,7 +7,7 @@ use Drupal\Core\Form\FormStateInterface; /** * Defines the base class for EmailAdjuster plug-ins. */ class EmailAdjusterBase extends EmailProcessorBase implements EmailAdjusterInterface { abstract class EmailAdjusterBase extends EmailProcessorBase implements EmailAdjusterInterface { /** * The default weight for an email adjuster. Loading
src/Processor/EmailBuilderBase.php +1 −1 Changes for src/Processor/EmailBuilderBase.php: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -8,7 +8,7 @@ use Drupal\symfony_mailer\EmailInterface; /** * Defines the base class for EmailBuilder plug-ins. */ class EmailBuilderBase extends EmailProcessorBase implements EmailBuilderInterface { abstract class EmailBuilderBase extends EmailProcessorBase implements EmailBuilderInterface { /** * The default weight for an email builder. Loading