public function actionDefault($page = 1) { $this->data->itemsCount = Story::countAll(); $this->data->pageSize = self::PAGE_SIZE; $this->data->activePage = $page; $this->data->items = Story::findAll(['order' => 'published DESC', 'offset' => ($page - 1) * self::PAGE_SIZE, 'limit' => self::PAGE_SIZE]); }
public function actionContentMessage() { $this->data->itemsCount = Story::countAll(); $this->data->pageSize = self::PAGE_SIZE; $this->data->activePage = 1; }