/** * @return \yii\db\ActiveQuery */ public function getGroup() { return $this->hasOne(MarkGroup::className(), ['id' => 'group_id']); }
/** * Показывает оцениваемые действия * @return string */ public function actionMarkact() { if (Yii::$app->getRequest()->getQueryParam('group') && Yii::$app->getRequest()->getQueryParam('user')) { $group = Yii::$app->getRequest()->getQueryParam('group'); $user = Yii::$app->getRequest()->getQueryParam('user'); $this->layout = '@app/themes/markself/views/layouts/pagein'; if ($this->userIfUserLegal($user)) { $actions = MarkActions::find()->where(['group_id' => $group])->all(); $group_name = MarkGroup::findOne($group)->name; return $this->render('mark_actions', ['user' => $this->current_user, 'actions' => $actions, 'group_name' => $group_name]); } } return $this->render('index'); }