Browse Source

Construct pour le Profile

François Drouhard 3 years ago
parent
commit
df3c366be5
1 changed files with 7 additions and 0 deletions
  1. 7 0
      src/Entity/Profile.php

+ 7 - 0
src/Entity/Profile.php

@@ -10,6 +10,8 @@ use Doctrine\ORM\Mapping as ORM;
  */
 class Profile
 {
+    public static $VIEW = ['liste' => 0, 'vignette' => 1];
+
     /**
      * @ORM\Id
      * @ORM\GeneratedValue
@@ -28,6 +30,11 @@ class Profile
      */
     private $view;
 
+    public function __construct()
+    {
+        $this->setView(Profile::$VIEW['vignette']);
+    }
+
     public function getId(): ?int
     {
         return $this->id;