function output($template = 'output', $backup_path = null) { if ($this->hasMethod(__FUNCTION__)) { return $this->override(__FUNCTION__, array($template, $backup_path)); } $targetUser = $targetContent = null; if ($this->targetUserId) { $targetUser = $this->POD->getPerson(array('id' => $this->targetUserId)); } if ($this->targetContentId) { if ($this->targetContentType == 'content') { $targetContent = $this->POD->getContent(array('id' => $this->targetContentId)); } else { if ($this->targetContentType == 'comment') { $targetContent = $this->POD->getComment(array('id' => $this->targetContentId)); } } } parent::output($template, array('alert' => $this, 'targetUser' => $targetUser, 'targetContent' => $targetContent), 'alerts', $backup_path); }
function output($template = 'message', $backup_path = null) { if ($this->hasMethod(__FUNCTION__)) { return $this->override(__FUNCTION__, array($template, $backup_path)); } parent::output($template, array('message' => $this), 'messages', $backup_path); }