You are here

private function MailchimpCampaignViewBuilder::renderTemplate in Mailchimp 8

Same name and namespace in other branches
  1. 2.x modules/mailchimp_campaign/src/Entity/MailchimpCampaignViewBuilder.php \Drupal\mailchimp_campaign\Entity\MailchimpCampaignViewBuilder::renderTemplate()

Converts a template into rendered content.

Parameters

array $template: Array of template sections.

Return value

array Array of template content indexed by section ID.

1 call to MailchimpCampaignViewBuilder::renderTemplate()
MailchimpCampaignViewBuilder::view in modules/mailchimp_campaign/src/Entity/MailchimpCampaignViewBuilder.php
Builds the render array for the provided entity.

File

modules/mailchimp_campaign/src/Entity/MailchimpCampaignViewBuilder.php, line 194

Class

MailchimpCampaignViewBuilder
Defines the render controller for MailchimpCampaign entities.

Namespace

Drupal\mailchimp_campaign\Entity

Code

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