getModule('student')->stipendLoader; $stipendLoader->setParams(Yii::$app->user->identity->guid); $this->recordBooks = $stipendLoader->loadRecordBooks(); if ($this->recordBook_id == null && sizeof($this->recordBooks) > 0) { $this->recordBook_id = $this->recordBooks[0]->id; } $this->stipends = $stipendLoader->loadStudentStipends($this->recordBook_id); } public function run() { return $this->render('stipend_widget', [ 'recordBooks' => $this->recordBooks, 'stipends' => $this->stipends, 'recordBook_id' => $this->recordBook_id, ]); } }