Skip to content
Snippets Groups Projects
Commit 2b97ea66 authored by dpi's avatar dpi
Browse files

Issue #3511950: :sparkles: Add interface for entity backed recipients

parent 8727a033
Branches
Tags
1 merge request!5Resolve #3511950 "Entity interface"
Pipeline #444685 passed with warnings
......@@ -15,7 +15,7 @@ use Symfony\Component\Notifier\Recipient\EmailRecipientInterface;
* You should implement your own class implementing EmailRecipientInterface if
* you need an object like this.
*/
final class EmailRecipient implements EmailRecipientInterface {
final class EmailRecipient implements EmailRecipientInterface, EntityRecipientInterface {
/**
* @internal
......
<?php
declare(strict_types=1);
namespace Drupal\notifier\Recipients\Recipient;
use Drupal\Core\Entity\EntityInterface;
use Symfony\Component\Notifier\Recipient\RecipientInterface;
interface EntityRecipientInterface extends RecipientInterface {
public function getEntity(): EntityInterface;
}
......@@ -14,7 +14,7 @@ use Symfony\Component\Notifier\Recipient\SmsRecipientInterface;
* You should implement your own class implementing SmsRecipientInterface if
* you need an object like this.
*/
final class SmsRecipient implements SmsRecipientInterface {
final class SmsRecipient implements SmsRecipientInterface, EntityRecipientInterface {
/**
* @internal
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment