public function SubscriberInterface::getSubscription in Simplenews 8
Same name and namespace in other branches
- 8.2 src/SubscriberInterface.php \Drupal\simplenews\SubscriberInterface::getSubscription()
- 3.x src/SubscriberInterface.php \Drupal\simplenews\SubscriberInterface::getSubscription()
Check if the subscriber has a subscription to a certain newsletter and return it.
Parameters
string $newsletter_id: The ID of a newsletter.
Return value
\Drupal\simplenews\Plugin\Field\FieldType\SubscriptionItem Returns the subscription item if the subscriber has the subscription, otherwise FALSE.
1 method overrides SubscriberInterface::getSubscription()
- Subscriber::getSubscription in src/
Entity/ Subscriber.php - Check if the subscriber has a subscription to a certain newsletter and return it.
File
- src/
SubscriberInterface.php, line 153
Class
- SubscriberInterface
- Provides an interface defining a contant message entity
Namespace
Drupal\simplenewsCode
public function getSubscription($newsletter_id);