
137
if (Yii::$app->user->identity->IsAdmin == false)
{
$id = Yii::$app->user->identity->id;
$dataProvider->query->andWhere('id_creator = ' . $id . ' or id_performer = ' . $id);
}
return $this->render('index', [
'searchModel' => $searchModel,
'dataProvider' => $dataProvider,
]);
}
/**
* Displays a single Request model.
* @param integer $id
* @return mixed
*/
public function actionView($id)
{
return $this->render('view', [
'model' => $this->findModel($id),
]);
}
/**
* Creates a new Request model.
* If creation is successful, the browser will be redirected to the 'view' page.
* @return mixed
*/
public function actionCreate()