function simplenews_newsletter_load in Simplenews 7.2
Same name and namespace in other branches
- 8 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
SimplenewsNewsletter Newsletter entity object, FALSE if newsletter does not exist.
Related topics
19 calls to simplenews_newsletter_load()
- SimpleNewsAdministrationTestCase::testNewsletterSettings in tests/
simplenews.test - Test various combinations of newsletter settings.
- SimpleNewsAdministrationTestCase::testSubscriptionManagement in tests/
simplenews.test - Test newsletter subscription management.
- SimpleNewsI18nTestCase::testNewsletterIssueTranslation in tests/
simplenews.test - SimplenewsSourceEntity::__construct in includes/
simplenews.source.inc - Implements SimplenewsSourceEntityInterface::_construct();
- SimplenewsSubscribeTestCase::testSubscribeAnonymous in tests/
simplenews.test - testSubscribeAnonymous
File
- ./
simplenews.module, line 2002 - Simplenews node handling, sent email, newsletter block and general hooks
Code
function simplenews_newsletter_load($newsletter_id, $reset = FALSE) {
if (!is_numeric($newsletter_id)) {
return FALSE;
}
$newsletter = simplenews_newsletter_load_multiple(array(
$newsletter_id,
), array(), $reset);
return $newsletter ? reset($newsletter) : FALSE;
}