Ojs\JournalBundle\Listeners\SectionMailer::onSectionPostUpdate PHP Метод

onSectionPostUpdate() публичный Метод

public onSectionPostUpdate ( Ojs\JournalBundle\Event\JournalItemEvent $itemEvent )
$itemEvent Ojs\JournalBundle\Event\JournalItemEvent
    public function onSectionPostUpdate(JournalItemEvent $itemEvent)
    {
        $getMailEvent = $this->ojsMailer->getEventByName(SectionEvents::POST_UPDATE, null, $itemEvent->getItem()->getJournal());
        if (!$getMailEvent) {
            return;
        }
        /** @var User $user */
        foreach ($this->ojsMailer->getJournalRelatedUsers() as $user) {
            $transformParams = ['section' => (string) $itemEvent->getItem(), 'done.by' => $this->ojsMailer->currentUser()->getUsername(), 'receiver.username' => $user->getUsername(), 'receiver.fullName' => $user->getFullName()];
            $template = $this->ojsMailer->transformTemplate($getMailEvent->getTemplate(), $transformParams);
            $this->ojsMailer->sendToUser($user, $getMailEvent->getSubject(), $template);
        }
    }