OEModule\OphCoMessaging\controllers\DefaultController::updateEventIssues PHP Method

updateEventIssues() protected method

Set the urgent issue (or otherwise) at the event level.
protected updateEventIssues ( )
    protected function updateEventIssues()
    {
        // This logic is slightly wonky because there's not an interface to check for
        // a specific issue on the event, but the assumption is that no issue is raised on the
        // message event asides from urgency
        if ($this->getMessageElement()->urgent) {
            if (!$this->event->hasIssue()) {
                $this->event->addIssue('Urgent');
            }
        } else {
            if ($this->event->hasIssue()) {
                $this->event->deleteIssue('Urgent');
            }
        }
    }