function newsletter_template_load in Newsletter 7.2
Same name and namespace in other branches
- 7 newsletter.module \newsletter_template_load()
Fetch a template object.
Parameters
$template_id: Integer specifying the template id.
$reset: A boolean indicating that the internal cache should be reset.
Return value
A fully-loaded $template object or FALSE if it cannot be loaded.
See also
newsletter_template_load_multiple()
4 calls to newsletter_template_load()
- NewsletterAutomated::__construct in includes/
newsletter.automated.inc - NewsletterBasic::sendBasic in includes/
newsletter.basic.inc - Sends email to a subscriber using a basic template (confirmation/welcome/unsubscribe emails).
- NewsletterCustom::__construct in includes/
newsletter.custom.inc - newsletter_get_template_terms in ./
newsletter.module - Fetches the terms for a template.
File
- modules/
template/ newsletter_template.module, line 254 - Module for the Newsletter Template Entity
Code
function newsletter_template_load($template_id, $reset = FALSE) {
if (empty($template_id)) {
return array();
}
$templates = newsletter_template_load_multiple(array(
$template_id,
), array(), $reset);
return reset($templates);
}