feat: add logic to sync drafts to server
Signed-off-by: Sebastian <krupinski01@gmail.com>
This commit is contained in:
+16
-2
@@ -2,6 +2,8 @@
|
||||
|
||||
namespace KTXM\Mail;
|
||||
|
||||
use KTXF\Event\DeliveryMode;
|
||||
use KTXF\Event\EventListenerRegistrarInterface;
|
||||
use KTXF\Module\ModuleBrowserInterface;
|
||||
use KTXF\Module\ModuleInstanceAbstract;
|
||||
|
||||
@@ -11,8 +13,20 @@ use KTXF\Module\ModuleInstanceAbstract;
|
||||
class Module extends ModuleInstanceAbstract implements ModuleBrowserInterface
|
||||
{
|
||||
|
||||
public function __construct()
|
||||
{ }
|
||||
public function __construct(
|
||||
private readonly EventListenerRegistrarInterface $events,
|
||||
) {}
|
||||
|
||||
public function boot(): void
|
||||
{
|
||||
$this->events->listen(
|
||||
$this->handle(),
|
||||
CompositionSavedEvent::class,
|
||||
CompositionSyncListener::class,
|
||||
'onCompositionSaved',
|
||||
DeliveryMode::Deferred,
|
||||
);
|
||||
}
|
||||
|
||||
public function handle(): string
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user