From: Raphaƫl Gertz Date: Sun, 3 Nov 2024 04:35:46 +0000 (+0100) Subject: Remove title member X-Git-Tag: 0.0.7~9 X-Git-Url: https://git.rapsys.eu/treebundle/commitdiff_plain/c14da51956d2ead5e780f404a2144bc99ed28e49?hp=6ac58a47c1fa39b19ca3ad3a6d2a09ccb32abf55 Remove title member Rename resource to asset --- diff --git a/Entity/Album.php b/Entity/Album.php index 0cf9b33..9177b10 100644 --- a/Entity/Album.php +++ b/Entity/Album.php @@ -37,22 +37,21 @@ class Album { /** * @var \Doctrine\Common\Collections\Collection */ - private Collection $resources; + private Collection $assets; /** * Constructor * * @param string $path The album path * @param string $slug The album slug - * @param string $title The album title */ - public function __construct(private string $path, private string $slug, private string $title) { + public function __construct(private string $path, private string $slug) { //Set defaults $this->created = new \DateTime('now'); $this->updated = new \DateTime('now'); //Set collections - $this->resources = new ArrayCollection(); + $this->assets = new ArrayCollection(); } /** @@ -108,28 +107,6 @@ class Album { return $this->slug; } - /** - * Set title - * - * @param string $title - * - * @return Album - */ - public function setTitle(string $title): Album { - $this->title = $title; - - return $this; - } - - /** - * Get title - * - * @return string - */ - public function getTitle(): string { - return $this->title; - } - /** * Set created * @@ -175,36 +152,36 @@ class Album { } /** - * Add resource + * Add asset * - * @param Resource $resource + * @param Asset $asset * * @return User */ - public function addResource(Resource $resource): User { - $this->resources[] = $resource; + public function addAsset(Asset $asset): User { + $this->assets[] = $asset; return $this; } /** - * Remove resource + * Remove asset * - * @param Resource $resource + * @param Asset $asset * * @return \Doctrine\Common\Collections\Collection */ - public function removeResource(Resource $resource): Collection { - return $this->resources->removeElement($resource); + public function removeAsset(Asset $asset): Collection { + return $this->assets->removeElement($asset); } /** - * Get resources + * Get assets * * @return \Doctrine\Common\Collections\Collection */ - public function getResources(): Collection { - return $this->resources; + public function getAssets(): Collection { + return $this->assets; } /**