protected function SubscriptionManager::addConfirmation in Simplenews 3.x
Same name and namespace in other branches
- 8.2 src/Subscription/SubscriptionManager.php \Drupal\simplenews\Subscription\SubscriptionManager::addConfirmation()
- 8 src/Subscription/SubscriptionManager.php \Drupal\simplenews\Subscription\SubscriptionManager::addConfirmation()
Add a mail confirmation or fetch them.
Parameters
string $action: The confirmation type, either subscribe or unsubscribe.
\Drupal\simplenews\SubscriberInterface $subscriber: The subscriber object.
\Drupal\simplenews\NewsletterInterface $newsletter: The newsletter object.
2 calls to SubscriptionManager::addConfirmation()
- SubscriptionManager::subscribe in src/
Subscription/ SubscriptionManager.php - Subscribe a user to a newsletter or send a confirmation mail.
- SubscriptionManager::unsubscribe in src/
Subscription/ SubscriptionManager.php - Unsubscribe a user from a mailing list or send a confirmation mail.
File
- src/
Subscription/ SubscriptionManager.php, line 266
Class
- SubscriptionManager
- Default subscription manager.
Namespace
Drupal\simplenews\SubscriptionCode
protected function addConfirmation($action, SubscriberInterface $subscriber, NewsletterInterface $newsletter) {
$this->confirmations[$subscriber
->getMail()][$newsletter
->id()] = $action;
}