You are here

function mailchimp_campaign_render_template in Mailchimp 7.2

Same name and namespace in other branches
  1. 8 modules/mailchimp_campaign/mailchimp_campaign.module \mailchimp_campaign_render_template()
  2. 7.5 modules/mailchimp_campaign/mailchimp_campaign.module \mailchimp_campaign_render_template()
  3. 7.3 modules/mailchimp_campaign/mailchimp_campaign.module \mailchimp_campaign_render_template()
  4. 7.4 modules/mailchimp_campaign/mailchimp_campaign.module \mailchimp_campaign_render_template()
  5. 2.x modules/mailchimp_campaign/mailchimp_campaign.module \mailchimp_campaign_render_template()

Convert an array of templates into rendered content.

Parameters

$template: Array keyed by the section name with a value of the template.

Return value

array Maintains section key with the value being the rendered content.

3 calls to mailchimp_campaign_render_template()
MailChimpCampaign::buildContent in modules/mailchimp_campaign/mailchimp_campaign.entity.inc
Builds a structured array representing the entity's content.
mailchimp_campaign_campaign_preview in modules/mailchimp_campaign/mailchimp_campaign.admin.inc
Preview callback for mailchimp_campaign_campaign_form().
mailchimp_campaign_save_campaign in modules/mailchimp_campaign/mailchimp_campaign.module
Save a campaign in MailChimp and as a Drupal entity.

File

modules/mailchimp_campaign/mailchimp_campaign.module, line 539

Code

function mailchimp_campaign_render_template($template) {
  $content = array();
  foreach ($template as $key => $part) {
    $content[$key] = check_markup($part['value'], $part['format']);
  }
  return $content;
}