function getContent() { if (!empty($this->arguments[0])) { $user = \Idno\Entities\User::getByHandle($this->arguments[0]); } if (empty($user)) { $this->noContent(); } //$this->setPermalink(); // This is a permalink $offset = (int) $this->getInput('offset'); $count = \Idno\Entities\ActivityStreamPost::count(array('owner' => $user->getUUID())); $feed = \Idno\Entities\ActivityStreamPost::get(array('owner' => $user->getUUID()), [], \Idno\Core\site()->config()->items_per_page, $offset); $t = \Idno\Core\site()->template(); $t->__(array('title' => $user->getTitle(), 'body' => $t->__(array('user' => $user, 'items' => $feed, 'count' => $count, 'offset' => $offset))->draw('entity/User/profile'), 'description' => 'The ' . \Idno\Core\site()->config()->title . ' profile for ' . $user->getTitle()))->drawPage(); }
/** * Retrieve the "post" activity stream post (if any) associated with this entity * @param string $verb The associated verb - default is post, but may be blank * @return array */ function getRelatedFeedItems($verb = 'post') { $results = array(); if ($this instanceof \Idno\Entities\ActivityStreamPost && $this->verb == $verb) { $results[] = $this; } $search = array('object' => $this->getUUID()); if (!empty($verb)) { $search['verb'] = $verb; } $other_results = \Idno\Entities\ActivityStreamPost::get($search); $return = array_merge($results, $other_results); return $return; }