/**
  * Show form with auth items for user.
  *
  * @param int $id
  */
 public function actionAssign($id)
 {
     $model = Yii::createObject(['class' => Assignment::className(), 'user_id' => $id]);
     if ($model->load(\Yii::$app->request->post()) && $model->updateAssignments()) {
     }
     return \matacms\rbac\widgets\Assignments::widget(['model' => $model]);
     /*$model = Yii::createObject([
                 'class'   => Assignment::className(),
                 'user_id' => $id,
             ]);
     
             if ($model->load(Yii::$app->request->post()) && $model->updateAssignments()) {
     
             }
     
             return $this->render('assign', [
                 'model' => $model,
             ]);*/
 }
<?php

/*
 * This file is part of the mata project.
 *
 * (c) mata project <http://github.com/mata>
 *
 * For the full copyright and license information, please view the LICENSE.md
 * file that was distributed with this source code.
 */
use matacms\rbac\widgets\Assignments;
/**
 * @var yii\web\View 				$this
 * @var matacms\user\models\User 	$user
 */
?>

<?php 
echo Assignments::widget(['form' => $form, 'userModel' => $userModel]);