public function Timeline() { $replies = (bool) $this->request->getVar('replies'); $since = $this->request->getVar('since'); $offset = (int) $this->request->getVar('offset'); $tags = $this->request->getVar('tags') ? $this->request->getVar('tags') : $this->tags; if (strlen($tags)) { $tags = explode(',', $tags); } else { $tags = array(); } $timeline = $this->microBlogService->getStatusUpdates(null, 'WilsonRating', $since, $offset, !$replies, $tags); return trim($this->customise(array('Posts' => $timeline, 'SortBy' => 'rating'))->renderWith('Timeline')); }
public function UserFeed() { if (!$this->securityContext->getMember()) { // return; } $id = $this->ViewingUserID(); if ($id) { $user = DataObject::get_by_id('Member', $id); if ($user && $user->exists()) { $data = $this->microBlogService->getStatusUpdates($user); } } else { if ($this->securityContext->getMember()) { $data = $this->microBlogService->getTimeline($this->securityContext->getMember()); } } return $data; }