public function display($tpl = null) { $app = JFactory::getApplication(); /** @var $app JApplicationSite */ $itemId = $app->input->getUint("id"); $userId = JFactory::getUser()->get("id"); $model = $this->getModel(); // Initialise variables $this->item = $model->getItem($itemId, $userId); $this->state = $this->get('State'); $this->params = $this->state->get('params'); $notification = new SocialCommunity\Notification(JFactory::getDbo()); $notification->load(array("id" => $itemId, "user_id" => $userId)); if ($notification->getId() and !$notification->isRead()) { $notification->updateStatus(Prism\Constants::READ); } $this->prepareDocument(); parent::display($tpl); }