<?php
namespace Products\NotificationsBundle\Entity\Recipients;
use Products\NotificationsBundle\Entity\AbstractRecipient;
use Doctrine\ORM\Mapping as ORM;
use Products\NotificationsBundle\Model\Contacts\EmailContactInterface;
/**
* Class EmailRecipient
* @package Products\NotificationsBundle\Entity\Recipients
*
* @ORM\Entity(
* repositoryClass = "Products\NotificationsBundle\Doctrine\Repository\Recipients\EmailRecipientRepository",
* )
*/
class EmailRecipient extends AbstractRecipient implements EmailContactInterface
{
const DISCR = 'email';
/**
* {@inheritDoc}
*/
public function getKind(): string
{
return AbstractRecipient::KINDS__EMAIL;
}
/**
* {@inheritDoc}
*/
public function getEmailAddress(): string
{
return $this->getContact();
}
/**
* {@inheritDoc}
*/
public function getDisplayName(): string
{
return $this->getEmailAddress();
}
}