143
* Displays a single Folder model.
* @param integer $id
* @return mixed
*/
public function actionView($id)
{
$model = $this->findModel($id);
$model->TestAccessByFlag('flag_view');
return $this->render('view', [
'model' => $model,
]);
}
/**
* Creates a new Folder model.
* If creation is successful, the browser will be redirected to the 'view'
page.
* @return mixed
*/
public function actionCreate()
{
$model = new Folder();
if ($model->load(Yii::$app->request->post()) && $model->save()) {
$model->registration_date = date('Y-m-d h:i:s');
$model->id_user = Yii::$app->user->identity->id;
$model->save();
return $this->redirect(['view', 'id' => $model->id]);
} else {