diff -r -u3 /usr/home/yfsrww/powermail-12.4.1/Classes/Controller/FormController.php ./Classes/Controller/FormController.php --- /usr/home/yfsrww/powermail-12.4.1/Classes/Controller/FormController.php 2024-09-17 08:41:59.000000000 +0200 +++ ./Classes/Controller/FormController.php 2024-09-26 16:00:53.087708036 +0200 @@ -302,10 +302,11 @@ if ($mail->getUid() !== null && !HashUtility::isHashValid($hash, $mail)) { return (new ForwardResponse('form'))->withoutArguments(); } - $event = GeneralUtility::makeInstance(FormControllerCreateActionBeforeRenderViewEvent::class, $mail, $hash, $this); + $event = GeneralUtility::makeInstance(FormControllerCreateActionBeforeRenderViewEvent::class, $mail, $hash, $this, $this->view); $this->eventDispatcher->dispatch($event); $mail = $event->getMail(); $hash = $event->getHash(); + $this->view = $event->getView(); /** @noinspection PhpUnhandledExceptionInspection */ $this->dataProcessorRunner->callDataProcessors( @@ -467,12 +468,14 @@ FormControllerOptinConfirmActionBeforeRenderViewEvent::class, $mail, $hash, - $this + $this, + $this->view ); $this->eventDispatcher->dispatch($event); $mail = $event->getMail(); $hash = $event->getHash(); + $this->view = $event->getView(); $response = $this->forwardIfFormParamsDoNotMatchForOptinConfirm($mail); if ($response !== null) { @@ -526,11 +529,13 @@ FormControllerDisclaimerActionBeforeRenderViewEvent::class, $mail, $hash, - $this + $this, + $this->view ); $this->eventDispatcher->dispatch($event); $mail = $event->getMail(); + $this->view = $event->getView(); $mailService = GeneralUtility::makeInstance( SendDisclaimedMailPreflight::class, diff -r -u3 /usr/home/yfsrww/powermail-12.3.5/Classes/Events/FormControllerCreateActionBeforeRenderViewEvent.php ./Classes/Events/FormControllerCreateActionBeforeRenderViewEvent.php --- /usr/home/yfsrww/powermail-12.3.5/Classes/Events/FormControllerCreateActionBeforeRenderViewEvent.php 2024-06-07 16:55:24.000000000 +0200 +++ ./Classes/Events/FormControllerCreateActionBeforeRenderViewEvent.php 2024-07-18 11:41:22.723575574 +0200 @@ -5,6 +5,7 @@ use In2code\Powermail\Controller\FormController; use In2code\Powermail\Domain\Model\Mail; +use TYPO3Fluid\Fluid\View\ViewInterface; final class FormControllerCreateActionBeforeRenderViewEvent { @@ -14,6 +15,11 @@ protected Mail $mail; /** + * @var ViewInterface|null + */ + protected ?ViewInterface $view; + + /** * @var string */ protected string $hash; @@ -27,12 +33,14 @@ * @param Mail $mail * @param string $hash * @param FormController $formController + * @param ViewInterface|null $view */ - public function __construct(Mail $mail, string $hash, FormController $formController) + public function __construct(Mail $mail, string $hash, FormController $formController, ?ViewInterface $view=null) { $this->mail = $mail; $this->hash = $hash; $this->formController = $formController; + $this->view = $view; } public function setMail(Mail $mail): void @@ -49,6 +57,22 @@ } /** + * @return ViewInterface|null + */ + public function getView(): ?ViewInterface + { + return $this->view; + } + + /** + * @param ViewInterface|null $view + */ + public function setView(?ViewInterface $view): void + { + $this->view = $view; + } + + /** * @return string */ public function getHash(): string diff -r -u3 /usr/home/yfsrww/powermail-12.3.5/Classes/Events/FormControllerDisclaimerActionBeforeRenderViewEvent.php ./Classes/Events/FormControllerDisclaimerActionBeforeRenderViewEvent.php --- /usr/home/yfsrww/powermail-12.3.5/Classes/Events/FormControllerDisclaimerActionBeforeRenderViewEvent.php 2024-06-07 16:55:24.000000000 +0200 +++ ./Classes/Events/FormControllerDisclaimerActionBeforeRenderViewEvent.php 2024-07-18 11:46:49.221082916 +0200 @@ -5,6 +5,7 @@ use In2code\Powermail\Controller\FormController; use In2code\Powermail\Domain\Model\Mail; +use TYPO3Fluid\Fluid\View\ViewInterface; final class FormControllerDisclaimerActionBeforeRenderViewEvent { @@ -14,6 +15,11 @@ protected Mail $mail; /** + * @var ViewInterface|null + */ + protected ?ViewInterface $view; + + /** * @var string */ protected string $hash; @@ -27,13 +33,15 @@ * @param Mail $mail * @param string $hash * @param FormController $formController - */ - public function __construct(Mail $mail, string $hash, FormController $formController) + * @param ViewInterface|null $view + */ + public function __construct(Mail $mail, string $hash, FormController $formController, ?ViewInterface $view=null) { $this->mail = $mail; $this->hash = $hash; $this->formController = $formController; - } + $this->view = $view; + } public function setMail(Mail $mail): void { @@ -49,6 +57,22 @@ } /** + * @return ViewInterface|null + */ + public function getView(): ?ViewInterface + { + return $this->view; + } + + /** + * @param ViewInterface|null $view + */ + public function setView(?ViewInterface $view): void + { + $this->view = $view; + } + + /** * @return string */ public function getHash(): string diff -r -u3 /usr/home/yfsrww/powermail-12.3.5/Classes/Events/FormControllerOptinConfirmActionBeforeRenderViewEvent.php ./Classes/Events/FormControllerOptinConfirmActionBeforeRenderViewEvent.php --- /usr/home/yfsrww/powermail-12.3.5/Classes/Events/FormControllerOptinConfirmActionBeforeRenderViewEvent.php 2024-06-07 16:55:24.000000000 +0200 +++ ./Classes/Events/FormControllerOptinConfirmActionBeforeRenderViewEvent.php 2024-07-18 11:50:38.710140834 +0200 @@ -5,6 +5,7 @@ use In2code\Powermail\Controller\FormController; use In2code\Powermail\Domain\Model\Mail; +use TYPO3Fluid\Fluid\View\ViewInterface; final class FormControllerOptinConfirmActionBeforeRenderViewEvent { @@ -14,6 +15,11 @@ protected Mail $mail; /** + * @var ViewInterface|null + */ + protected ?ViewInterface $view; + + /** * @var string */ protected string $hash; @@ -27,12 +33,14 @@ * @param Mail $mail * @param string $hash * @param FormController $formController + * @param ViewInterface|null $view */ - public function __construct(Mail $mail, string $hash, FormController $formController) + public function __construct(Mail $mail, string $hash, FormController $formController, ?ViewInterface $view=null) { $this->mail = $mail; $this->hash = $hash; $this->formController = $formController; + $this->view = $view; } /** @@ -52,6 +60,22 @@ } /** + * @return ViewInterface|null + */ + public function getView(): ?ViewInterface + { + return $this->view; + } + + /** + * @param ViewInterface|null $view + */ + public function setView(?ViewInterface $view): void + { + $this->view = $view; + } + + /** * @return string */ public function getHash(): string