/**
  * Creates a new model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  */
 public function actionCreate()
 {
     $model = new NotificationType();
     // Uncomment the following line if AJAX validation is needed
     // $this->performAjaxValidation($model);
     if (isset($_POST['NotificationType'])) {
         $model->attributes = $_POST['NotificationType'];
         if ($model->save()) {
             $this->audit->logAudit(Yii::app()->user->id, new DateTime(), Constants::AUDITORIA_OBJETO_TIPO_NOTIFICACION, Constants::AUDITORIA_OPERACION_ALTA, $model->id);
             $this->render('/site/successfullOperation', array('header' => 'Tipo de notificación creado con éxito', 'message' => 'Haga click en volver para regresar a la gestión de tipos de notificación', 'returnUrl' => Yii::app()->createUrl('notificationtype/admin'), 'viewUrl' => Yii::app()->createUrl("notificationtype/view", array("id" => $model->id))));
             return;
         }
     }
     $this->render('create', array('model' => $model));
 }