protected function getOutput($clientName)
{
$tmplPaths = $this->container->get('aimeos')->get()->getCustomPaths('client/html/templates');
$context = $this->container->get('aimeos_context')->get();
$langid = $context->getLocale()->getLanguageId();
$view = $this->container->get('aimeos_view')->create($context, $tmplPaths, $langid);
$context->setView($view);
$client = \Aimeos\Client\Html\Factory::createClient($context, $tmplPaths, $clientName);
$client->setView($view);
$client->process();
$twig = $this->container->get('twig');
$vars = $twig->getGlobals();
if (!isset($vars['aiheader'])) {
$vars['aiheader'] = array();
}
$vars['aiheader'][$clientName] = (string) $client->getHeader();
$twig->addGlobal('aiheader', $vars['aiheader']);
return new Response((string) $client->getBody());
}