public function actionIndex($userId, $schId) { //$models = News::getNews($schId); $model = new StudentlkForm(); $model->userID = $userId; $model->curSchoolID = $schId; $lessons = Lesson::getLessons($schId, $userId); return $this->render('index', ['model' => $model, 'lessons' => $lessons]); }
/** * @inheritdoc */ protected function prepareModels() { $models = []; $pagination = $this->getPagination(); if ($pagination === false) { $models = Lesson::getLessons($this->sid, $this->uid); } else { // $pagination->totalCount = $this->getTotalCount(); // $this->fileObject->seek($pagination->getOffset()); // $limit = $pagination->getLimit(); // for ($count = 0; $count < $limit; ++$count) { // $models[] = $this->fileObject->fgetcsv(); // $this->fileObject->next(); // } } return $models; }