'mailModel' =>
$mailModel,
] );
// Save current context to mail model
$mailContext =
json_decode(json_encode($context), true
);
$mailModel->
setContext($mailContext);
$this->
getModelManager()->
flush($mailModel);
$this->
getStringCompiler()->
setContext(array_merge($defaultContext,
$context));
$mail =
clone Shopware()->
Container()->
get('mail'
);
return $this->
loadValues($mail,
$mailModel,
$overrideConfig);
} /**
* Loads values from MailModel into Mail
*
* @param array $overrideConfig
*
* @throws Enlight_Exception
*
* @return Enlight_Components_Mail
*/