|
@@ -2,7 +2,7 @@
|
|
|
|
|
|
namespace App\Controller;
|
|
namespace App\Controller;
|
|
|
|
|
|
-use App\Entity\Profile;
|
|
|
|
|
|
+use App\Config\View;
|
|
use Doctrine\ORM\EntityManagerInterface;
|
|
use Doctrine\ORM\EntityManagerInterface;
|
|
use App\Form\UserEditProfilType;
|
|
use App\Form\UserEditProfilType;
|
|
use App\Form\ProfileType;
|
|
use App\Form\ProfileType;
|
|
@@ -59,10 +59,10 @@ class ProfilController extends AbstractController
|
|
/** @var \App\Entity\User $user */
|
|
/** @var \App\Entity\User $user */
|
|
$user = $this->getUser();
|
|
$user = $this->getUser();
|
|
$profile = $user->getProfile();
|
|
$profile = $user->getProfile();
|
|
- if ($profile->getView() == Profile::$VIEW['liste']) {
|
|
|
|
- $profile->setView(Profile::$VIEW['vignette']);
|
|
|
|
|
|
+ if ($profile->getView() == View::TABLEAU) {
|
|
|
|
+ $profile->setView(View::VIGNETTE);
|
|
} else {
|
|
} else {
|
|
- $profile->setView(Profile::$VIEW['liste']);
|
|
|
|
|
|
+ $profile->setView(View::TABLEAU);
|
|
}
|
|
}
|
|
$em->flush();
|
|
$em->flush();
|
|
|
|
|