public function actionDefault($page = 1) { $this->data->itemsCount = Photo::countAll(); $this->data->pageSize = self::PAGE_SIZE; $this->data->activePage = $page; $this->data->items = Album::findAll(['offset' => ($page - 1) * self::PAGE_SIZE, 'limit' => self::PAGE_SIZE, 'where' => '__prt = 0']); }