/**
  * Edits a Profile Field Category
  */
 public function actionEditCategory()
 {
     $id = (int) Yii::$app->request->get('id');
     $category = ProfileFieldCategory::findOne(['id' => $id]);
     if ($category == null) {
         $category = new ProfileFieldCategory();
     }
     $category->translation_category = $category->getTranslationCategory();
     if ($category->load(Yii::$app->request->post()) && $category->validate() && $category->save()) {
         return $this->redirect(Url::to(['/admin/user-profile']));
     }
     return $this->render('editCategory', array('category' => $category));
 }