de.propeace.mailinglistsync/Civi/Mailinglistsync/EventMailingList.php
2025-03-04 11:15:09 +01:00

56 lines
1.2 KiB
PHP

<?php
namespace Civi\Mailinglistsync;
use CRM_Mailinglistsync_ExtensionUtil as E;
use Civi\Api4\Event;
class EventMailingList extends BaseMailingList {
public const CUSTOM_GROUP_NAME = 'Event_Mailing_List';
public const LOCATION_TYPE = 'Event_Mailing_List_Address';
protected const RELATED_CLASS = Event::class;
protected const RELATED_TYPE = 'event';
protected array $event;
/**
* Returns the related event.
*
* @return array
*/
protected function getEntity(): array {
return $this->event;
}
/**
* Set the related event.
*
* @param array $value
*
* @return void
*/
protected function setEntity(array $value): void {
$this->event = $value;
}
public function getRecipients(): array {
// TODO: Implement getRecipients() method.
}
/**
* Get a list of participants status that are enabled for the mailing list.
*
* @return array
*/
public static function getEnabledParticipantStatus(): array {
return MailingListSettings::get(E::SHORT_NAME . '_participant_status');
}
public static function create(array $values): BaseMailingList {
// TODO: Implement create() method.
}
}