public function __construct( private readonly string
$subject,
private readonly array
$recipients,
private readonly array
$contents,
private readonly Context
$context,
private readonly ?string
$eventName = null
) { } public static function getAvailableData(): EventDataCollection
{ return (new EventDataCollection()) ->
add('subject',
new ScalarValueType(ScalarValueType::TYPE_STRING
)) ->
add('contents',
new ScalarValueType(ScalarValueType::TYPE_STRING
)) ->
add('recipients',
new ArrayType(new ScalarValueType(ScalarValueType::TYPE_STRING
)));
} public function getName(): string
{ return self::EVENT_NAME;
} /**
* @return array<string, scalar|array<mixed>|null>
*/