You are here

public function SubscriberInterface::unsubscribe in Simplenews 3.x

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

Delete a subscription to a certain newsletter of the subscriber.

Parameters

string $newsletter_id: The ID of a newsletter.

string $source: The source where the subscription comes from.

int $timestamp: The timestamp of when the subscription was added.

1 method overrides SubscriberInterface::unsubscribe()
Subscriber::unsubscribe in src/Entity/Subscriber.php
Delete a subscription to a certain newsletter of the subscriber.

File

src/SubscriberInterface.php, line 187

Class

SubscriberInterface
Simplenews subscriber entity interface.

Namespace

Drupal\simplenews

Code

public function unsubscribe($newsletter_id, $source = 'unknown', $timestamp = REQUEST_TIME);