101b165905
Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
66 lines
1.6 KiB
PHP
66 lines
1.6 KiB
PHP
<?php
|
|
|
|
namespace KTXM\ProviderMailSystem;
|
|
|
|
use KTXC\Resource\ProviderManager;
|
|
use KTXF\Module\Configuration\BrowserModuleContextInterface;
|
|
use KTXF\Module\Configuration\ModuleContextInterface;
|
|
use KTXF\Module\ModuleInstanceAbstract;
|
|
use KTXF\Resource\Provider\ProviderInterface;
|
|
use KTXM\ProviderMailSystem\Providers\Provider;
|
|
|
|
class Module extends ModuleInstanceAbstract
|
|
{
|
|
public function __construct(
|
|
private readonly ProviderManager $providerManager,
|
|
) {}
|
|
|
|
public function handle(): string
|
|
{
|
|
return 'provider_mail_system';
|
|
}
|
|
|
|
public function label(): string
|
|
{
|
|
return 'System Mail Provider';
|
|
}
|
|
|
|
public function author(): string
|
|
{
|
|
return 'Ktrix';
|
|
}
|
|
|
|
public function description(): string
|
|
{
|
|
return 'System mail provider module for Ktrix - routes system-generated mail to configured mail services';
|
|
}
|
|
|
|
public function version(): string
|
|
{
|
|
return '0.0.2';
|
|
}
|
|
|
|
public function permissions(): array
|
|
{
|
|
return [
|
|
'provider_mail_system' => [
|
|
'label' => 'Access System Mail Provider',
|
|
'description' => 'View and access the System mail provider module',
|
|
'group' => 'Mail Providers'
|
|
],
|
|
];
|
|
}
|
|
|
|
public function boot(): void
|
|
{
|
|
$this->providerManager->register(ProviderInterface::TYPE_MAIL, 'system', Provider::class);
|
|
}
|
|
|
|
public function configure(ModuleContextInterface $context): void
|
|
{
|
|
if ($context instanceof BrowserModuleContextInterface) {
|
|
$context->registerModule($this, 'ProviderMailSystem', 'static/module.mjs');
|
|
}
|
|
}
|
|
}
|