protected function commonAction($model, $redirectUrl, $view)
    {
        $request = Yii::$app->getRequest();

        if ($request->getIsPost() && $this->repository->save($model, $request->post())) {
            return $this->redirect($redirectUrl);
        }

        return $this->render($view, \compact('model'));
    }