public function buildFormatContext($templateId, $template, $context)
{
$baseContext = $this->buildBaseFormatContext($context);
foreach (array('layout', 'formatter', 'converters') as $key) {
if (isset($context[$key])) {
$baseContext->set($key, $context[$key]);
}
}
return new FormatContext($templateId, $template, $baseContext->export());
}