/** * @param PFUser $user * @param $project_id * @param $limit * @param $offset * @param $pagename * @return array {@type Tuleap\REST\v1\PhpWikiPageRepresentation} */ public function getPhpWikiPlugin(PFUser $user, $project_id, $limit, $offset, $pagename) { $all_pages = $this->wiki_pages_factory->getPaginatedUserPages($user, $project_id, $limit, $offset, $pagename); $pages = array(); foreach ($all_pages->getPages() as $page) { $representation = new PhpWikiPluginPageRepresentation(); $representation->build($page); $pages[] = $representation; } return $pages; }
public function build(PHPWikiPage $page) { parent::build($page); $this->last_version = (int) $page->getCurrentVersion(); $this->versions = $this->getVersionsRepresentations(); }