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