Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function paginate($limit = 10, $publishedon = null)
- {
- $q = $this->newQuery();
- $q->select(['id','pagetitle','какие-то поля','publishedon']);
- $where = ['published' => 1, 'deleted' => 0, 'parent' => $this->parent];
- if ($last_id) {
- $where['publishedon:<'] = $last_id;
- }
- $q->where($where);
- $q->limit($limit);
- $q->sortby('publishedon', 'DESC');
- return $q->fetch(true);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement