function simplenews_newsletter_load in Simplenews 8
Same name and namespace in other branches
- 7.2 simplenews.module \simplenews_newsletter_load()
- 7 simplenews.module \simplenews_newsletter_load()
Get a simplenews newsletter entity object.
Parameters
$newsletter_id: Simplenews newsletter ID.
Return value
\Drupal\simplenews\NewsletterInterface Newsletter entity object, NULL if newsletter does not exist.
Related topics
9 calls to simplenews_newsletter_load()
- ConfirmationController::confirmSubscription in src/
Controller/ ConfirmationController.php - Menu callback: confirm the user's (un)subscription request
- Mailer::sendCombinedConfirmation in src/
Mail/ Mailer.php - Send collected confirmations.
- SimplenewsSubscribeTest::testSubscribeAnonymous in src/
Tests/ SimplenewsSubscribeTest.php - testSubscribeAnonymous
- simplenews_rules_action_send in simplenews_rules/
simplenews_rules.rules.inc - Action implementation, send a newsletter node.
- simplenews_rules_simplenews_subscribe in simplenews_rules/
simplenews_rules.module - Implements hook_simplenews_unsubscribe().
1 string reference to 'simplenews_newsletter_load'
- NewsletterForm::form in src/
Form/ NewsletterForm.php - Overrides Drupal\Core\Entity\EntityForm::form().
File
- ./
simplenews.module, line 736 - Simplenews node handling, sent email, newsletter block and general hooks
Code
function simplenews_newsletter_load($newsletter_id, $reset = FALSE) {
$newsletter = simplenews_newsletter_load_multiple(array(
$newsletter_id,
), $reset);
return $newsletter ? reset($newsletter) : NULL;
}