You are here

public function SubscriberInterface::getSubscription in Simplenews 3.x

Same name and namespace in other branches
  1. 8.2 src/SubscriberInterface.php \Drupal\simplenews\SubscriberInterface::getSubscription()
  2. 8 src/SubscriberInterface.php \Drupal\simplenews\SubscriberInterface::getSubscription()

Returns the subscription to a given newsletter..

Parameters

string $newsletter_id: The ID of a newsletter.

Return value

\Drupal\simplenews\Plugin\Field\FieldType\SubscriptionItem The subscription item if the subscriber is subscribed, otherwise FALSE.

1 method overrides SubscriberInterface::getSubscription()
Subscriber::getSubscription in src/Entity/Subscriber.php
Returns the subscription to a given newsletter..

File

src/SubscriberInterface.php, line 153

Class

SubscriberInterface
Simplenews subscriber entity interface.

Namespace

Drupal\simplenews

Code

public function getSubscription($newsletter_id);