🔖 Version 1.0.0-beta

This commit is contained in:
Marc Koch 2025-03-20 16:01:05 +01:00
parent c93a06972b
commit 460a811554
Signed by: marc.koch
GPG key ID: 12406554CFB028B9
26 changed files with 2480 additions and 771 deletions

View file

@ -1,10 +1,13 @@
<?php
declare(strict_types=1);
namespace Civi\Mailinglistsync;
use Civi\Mailinglistsync\Exceptions\ContactSyncException;
use CRM_Mailinglistsync_ExtensionUtil as E;
class MailingListManager {
use Singleton;
/**
* Is the mailing list enabled?
@ -67,7 +70,7 @@ class MailingListManager {
*
* @throws \Exception
*/
function __construct() {
protected function __construct() {
// Load settings
$settings = MailingListSettings::get();
$this->enabled = $settings[E::SHORT_NAME . '_enable'] ?? FALSE;
@ -82,17 +85,6 @@ class MailingListManager {
$this->dovecotToken = $settings[E::SHORT_NAME . '_dovecot_token'] ??
throw new \Exception('No dovecot token set');
$this->dovecotPort = $settings[E::SHORT_NAME . '_dovecot_port'] ?? 443;
$this->mlmmjApi = MailingListApi::getInstance();
}
function createEmailAddress(string $emailAddress) {} // TODO
function deleteEmailAddress(string $emailAddress) {} // TODO
function createMailingList(BaseMailingList $mailingList) {} // TODO
function deleteMailingList(BaseMailingList $mailingList) {} // TODO
function updateMailingList(BaseMailingList $mailingList) {} // TODO
}