You are here

function mandrill_template_map_load_entities in Mandrill 7

Same name and namespace in other branches
  1. 8 modules/mandrill_template/mandrill_template.module \mandrill_template_map_load_entities()
  2. 7.2 modules/mandrill_template/mandrill_template.module \mandrill_template_map_load_entities()

Loads a single mandrill_template_map or all of them if no name provided.

Parameters

null $name: name of the template map entity

Return value

array array of template_map entities

1 call to mandrill_template_map_load_entities()
mandrill_template_map_usage in modules/mandrill_template/mandrill_template.module
Get all mailsystem keys pointed at mandrill and their template mappings.
1 string reference to 'mandrill_template_map_load_entities'
mandrill_template_map_form in modules/mandrill_template/mandrill_template.admin.inc
Return a form for adding/editing a Mandrill template map.

File

modules/mandrill_template/mandrill_template.module, line 74
Enables Drupal to send email using Mandrill's template system.

Code

function mandrill_template_map_load_entities($name = NULL) {
  $maps = entity_load_multiple_by_name('mandrill_template_map', isset($name) ? array(
    $name,
  ) : FALSE);
  return isset($name) ? reset($maps) : $maps;
}