public function SubscriberInterface::subscribe in Simplenews 3.x
Same name and namespace in other branches
- 8.2 src/SubscriberInterface.php \Drupal\simplenews\SubscriberInterface::subscribe()
- 8 src/SubscriberInterface.php \Drupal\simplenews\SubscriberInterface::subscribe()
Add a subscription to a certain newsletter to the subscriber.
Parameters
string $newsletter_id: The ID of a newsletter.
int $status: The status of the subscription.
string $source: The source where the subscription comes from.
int $timestamp: The timestamp of when the subscription was added.
1 method overrides SubscriberInterface::subscribe()
- Subscriber::subscribe in src/
Entity/ Subscriber.php - Add a subscription to a certain newsletter to the subscriber.
File
- src/
SubscriberInterface.php, line 175
Class
- SubscriberInterface
- Simplenews subscriber entity interface.
Namespace
Drupal\simplenewsCode
public function subscribe($newsletter_id, $status = SIMPLENEWS_SUBSCRIPTION_STATUS_SUBSCRIBED, $source = 'unknown', $timestamp = REQUEST_TIME);