🎉 initial commit
This commit is contained in:
commit
c93a06972b
27 changed files with 4189 additions and 0 deletions
56
Civi/Mailinglistsync/EventMailingList.php
Normal file
56
Civi/Mailinglistsync/EventMailingList.php
Normal file
|
@ -0,0 +1,56 @@
|
|||
<?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.
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue