/**
  * Deletes an existing Project model.
  * If deletion is successful, the browser will be redirected to the 'index' page.
  * @param integer $id
  * @return mixed
  */
 public function actionDelete($id)
 {
     $this->findModel($id)->delete();
     Registration::deleteAll(['project_id' => $id]);
     ProjectVacancy::deleteAll(['project_id' => $id]);
     Yii::$app->getSession()->setFlash('success', 'El proyecto se ha eliminado exitosamente.');
     return $this->redirect(['index']);
 }