public function formatBlocks($templateId, $template, $context)
{
$formatContext = $this->buildFormatContext($templateId, $template, $context);
if (!$formatContext->formatter()) {
return array('content' => $template);
}
$this->eventDispatcher->dispatch(Sculpin::EVENT_BEFORE_FORMAT, new FormatEvent($formatContext));
$response = $this->formatter($formatContext->formatter())->formatBlocks($formatContext);
return $response;
}