public function get_view() { $articles = article::get_all(['aid', 'date', 'title', 'poster', 'post', 'snippet'], ['order' => 'date DESC', 'where' => 'parent_aid=0']); $html = node::create('div#list_wrapper', [], $articles->iterate_return(function (article $article) { return $article->get_cell(); }) . node::create('div#article_wrapper', [])); return $html; }
public function set_current($aid) { $this->current = new article(); $this->current->do_retrieve_from_id([], $aid); }