You are here

public function Subscriber::getMail in Simplenews 8

Same name and namespace in other branches
  1. 8.2 src/Entity/Subscriber.php \Drupal\simplenews\Entity\Subscriber::getMail()
  2. 3.x src/Entity/Subscriber.php \Drupal\simplenews\Entity\Subscriber::getMail()

Returns the subscribers email address.

Return value

string The subscribers email address.

Overrides SubscriberInterface::getMail

1 call to Subscriber::getMail()
Subscriber::getUser in src/Entity/Subscriber.php
Returns corresponding User object, if any.

File

src/Entity/Subscriber.php, line 88

Class

Subscriber
Defines the simplenews subscriber entity.

Namespace

Drupal\simplenews\Entity

Code

public function getMail() {
  return $this
    ->get('mail')->value;
}