/**
* @throws MailEventConfigurationException
* @throws SalesChannelNotFoundException
* @throws InconsistentCriteriaIdsException
*/
public function handleFlow(StorableFlow
$flow): void
{ $extension =
$flow->
getContext()->
getExtension(self::MAIL_CONFIG_EXTENSION
);
if (!
$extension instanceof MailSendSubscriberConfig
) { $extension =
new MailSendSubscriberConfig(false,
[],
[]);
} if ($extension->
skip()) { return;
} if (!
$flow->
hasData(MailAware::MAIL_STRUCT
) || !
$flow->
hasData(MailAware::SALES_CHANNEL_ID
)) { throw new MailEventConfigurationException('Not have data from MailAware',
$flow::
class);
} $eventConfig =
$flow->
getConfig();