'userId' =>
$userId,
'status'
=> ($mode === 'allow' ? 'accepted' : 'rejected'
),
],
] );
return;
} $translationReader =
$this->container->
get(Shopware_Components_Translation::
class);
$translation =
$translationReader->
read($customer['languageId'
], 'config_mails',
$mailModel->
getId());
$mailModel->
setTranslation($translation);
$mailData =
[ 'content' =>
nl2br($mailModel->
getContent()) ?: '',
'fromMail' =>
$mailModel->
getFromMail() ?: '{config name=mail}',
'fromName' =>
$mailModel->
getFromName() ?: '{config name=shopName}',
'subject' =>
$mailModel->
getSubject(),
'toMail' =>
$customer['email'
],
'userId' =>
$userId,
'status'
=> ($mode === 'allow' ? 'accepted' : 'rejected'
),
];
$this->
View()->
assign(['success' => true, 'data' =>
$mailData]);
}