/**
  * Creates a new Fragment model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  * @return mixed
  */
 public function actionCreate($type)
 {
     $model = new Fragment();
     $model->type = $type;
     if ($model->load(Yii::$app->request->post()) && $model->save()) {
         return $this->redirect(['index', 'type' => $type]);
     } else {
         return $this->render('create', ['model' => $model]);
     }
 }