-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
306 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
namespace In2code\Luxletter\Events; | ||
|
||
use Psr\Http\Message\ServerRequestInterface; | ||
|
||
final class AfterTestMailButtonClickedEvent | ||
{ | ||
public const STATUS_SEVERITY_SUCCESS = 'alert-success'; | ||
public const STATUS_SEVERITY_WARNING = 'alert-warning'; | ||
public const STATUS_SEVERITY_ERROR = 'alert-danger'; | ||
|
||
protected ServerRequestInterface $request; | ||
|
||
protected bool $testMailIsSendExternal = false; | ||
protected bool $status = false; | ||
|
||
protected string $statusTitle = ''; | ||
protected string $statusMessage = ''; | ||
protected string $statusSeverity = self::STATUS_SEVERITY_ERROR; | ||
|
||
public function __construct(ServerRequestInterface $request) | ||
{ | ||
$this->request = $request; | ||
} | ||
|
||
public function getRequest(): ServerRequestInterface | ||
{ | ||
return $this->request; | ||
} | ||
|
||
public function isTestMailIsSendExternal(): bool | ||
{ | ||
return $this->testMailIsSendExternal; | ||
} | ||
|
||
public function setTestMailIsSendExternal(): self | ||
{ | ||
$this->testMailIsSendExternal = true; | ||
return $this; | ||
} | ||
|
||
public function getStatus(): bool | ||
{ | ||
return $this->status; | ||
} | ||
|
||
public function setStatus(bool $status): self | ||
{ | ||
$this->status = $status; | ||
return $this; | ||
} | ||
|
||
public function getStatusTitle(): string | ||
{ | ||
return $this->statusTitle; | ||
} | ||
|
||
public function setStatusTitle(string $statusTitle): self | ||
{ | ||
$this->statusTitle = $statusTitle; | ||
return $this; | ||
} | ||
|
||
public function getStatusMessage(): string | ||
{ | ||
return $this->statusMessage; | ||
} | ||
|
||
public function setStatusMessage(string $statusMessage): self | ||
{ | ||
$this->statusMessage = $statusMessage; | ||
return $this; | ||
} | ||
|
||
public function getStatusSeverity(): string | ||
{ | ||
return $this->statusSeverity; | ||
} | ||
|
||
public function setStatusSeverity(string $statusSeverity): self | ||
{ | ||
$this->statusSeverity = $statusSeverity; | ||
return $this; | ||
} | ||
|
||
public function getStatusResponse(): array | ||
{ | ||
return [ | ||
'statusTitle' => $this->getStatusTitle(), | ||
'statusMessage' => $this->getStatusMessage(), | ||
'statusSeverity' => $this->getStatusSeverity(), | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
namespace In2code\Luxletter\Events; | ||
|
||
use In2code\Luxletter\Domain\Model\Queue; | ||
|
||
final class BeforeBodytextIsParsedEvent | ||
{ | ||
protected Queue $queue; | ||
|
||
protected string $bodytext = ''; | ||
|
||
public function __construct(Queue $queue) | ||
{ | ||
$this->queue = $queue; | ||
$this->bodytext = $queue->getNewsletter()->getBodytext(); | ||
} | ||
|
||
public function getQueue(): Queue | ||
{ | ||
return $this->queue; | ||
} | ||
|
||
public function getBodytext(): string | ||
{ | ||
return $this->bodytext; | ||
} | ||
|
||
public function setBodytext(string $bodytext): self | ||
{ | ||
$this->bodytext = $bodytext; | ||
return $this; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.