protected function execute(InputInterface $input, OutputInterface $output)
{
$this->io->title('Synchronize all mail events.');
$mailEventClassChain = $this->container->get('ojs_core.mail.event_chain')->getMailEvents();
foreach ($mailEventClassChain as $mailEventClass) {
if ($mailEventClass instanceof MailEventsInterface) {
$getEvensOptions = $mailEventClass->getMailEventsOptions();
foreach ($getEvensOptions as $eventOption) {
if ($eventOption instanceof EventDetail) {
$this->startMailEventSync($eventOption);
} else {
throw new \LogicException('all array item must be instance of EventDetail Class');
}
}
}
}
}