diff options
Diffstat (limited to 'src/model/entities/Asset.php')
-rw-r--r-- | src/model/entities/Asset.php | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/model/entities/Asset.php b/src/model/entities/Asset.php index df8c98b..e1071b4 100644 --- a/src/model/entities/Asset.php +++ b/src/model/entities/Asset.php | |||
@@ -19,13 +19,10 @@ class Asset | |||
19 | #[ORM\Column(type: "string", length: 255, unique: true)] // nom d'image UNIQUE | 19 | #[ORM\Column(type: "string", length: 255, unique: true)] // nom d'image UNIQUE |
20 | private string $file_name; | 20 | private string $file_name; |
21 | 21 | ||
22 | // choisir un répertoire du genre /var/www/html/uploads/ de préférence hors de /src | 22 | // choisir un répertoire du genre /var/www/html/uploads/, au moins hors de /src |
23 | #[ORM\Column(type: "string", length: 255, unique: true, nullable: true)] | 23 | #[ORM\Column(type: "string", length: 255, unique: true, nullable: true)] |
24 | private ?string $file_path; | 24 | private ?string $file_path; |
25 | 25 | ||
26 | #[ORM\Column(type: "string", length: 255, unique: true, nullable: true)] | ||
27 | private ?string $file_path_mini; | ||
28 | |||
29 | #[ORM\Column(type: "string", length: 255, nullable: true)] | 26 | #[ORM\Column(type: "string", length: 255, nullable: true)] |
30 | private string $mime_type; // image/jpeg, image/png, etc | 27 | private string $mime_type; // image/jpeg, image/png, etc |
31 | 28 | ||
@@ -44,11 +41,10 @@ class Asset | |||
44 | #[ORM\ManyToMany(targetEntity: NodeData::class, mappedBy: "assets")] | 41 | #[ORM\ManyToMany(targetEntity: NodeData::class, mappedBy: "assets")] |
45 | private $node_data; | 42 | private $node_data; |
46 | 43 | ||
47 | public function __construct(string $name, ?string $path, ?string $path_mini, string $mime_type, string $alt) | 44 | public function __construct(string $name, ?string $path, string $mime_type, string $alt) |
48 | { | 45 | { |
49 | $this->file_name = $name; | 46 | $this->file_name = $name; |
50 | $this->file_path = $path; | 47 | $this->file_path = $path; |
51 | $this->file_path_mini = $path_mini; | ||
52 | $this->mime_type = $mime_type; | 48 | $this->mime_type = $mime_type; |
53 | $this->alt = $alt; | 49 | $this->alt = $alt; |
54 | } | 50 | } |
@@ -61,10 +57,6 @@ class Asset | |||
61 | { | 57 | { |
62 | return $this->file_path; | 58 | return $this->file_path; |
63 | } | 59 | } |
64 | public function getFilePathMini(): string | ||
65 | { | ||
66 | return $this->file_path_mini; | ||
67 | } | ||
68 | public function getAlt(): string | 60 | public function getAlt(): string |
69 | { | 61 | { |
70 | return $this->alt; | 62 | return $this->alt; |