You are here

public function SubscriptionWidget::setAvailableNewsletterIds in Simplenews 8

Same name and namespace in other branches
  1. 8.2 src/Plugin/Field/FieldWidget/SubscriptionWidget.php \Drupal\simplenews\Plugin\Field\FieldWidget\SubscriptionWidget::setAvailableNewsletterIds()
  2. 3.x src/Plugin/Field/FieldWidget/SubscriptionWidget.php \Drupal\simplenews\Plugin\Field\FieldWidget\SubscriptionWidget::setAvailableNewsletterIds()

Set the newsletters available for selection.

Parameters

string[] $newsletter_ids: Indexed array of newsletter IDs.

Overrides SubscriptionWidgetInterface::setAvailableNewsletterIds

File

src/Plugin/Field/FieldWidget/SubscriptionWidget.php, line 41

Class

SubscriptionWidget
Plugin implementation of the 'simplenews_subscription_select' widget.

Namespace

Drupal\simplenews\Plugin\Field\FieldWidget

Code

public function setAvailableNewsletterIds(array $newsletter_ids) {
  $this->newsletterIds = $newsletter_ids;
}