X-Git-Url: https://git.rapsys.eu/treebundle/blobdiff_plain/bc23d7a89281c97e385b252c02de5f117f72b5a3..399693f8abe63c3a13d403105bbed688a9274d3d:/Entity/Resource.php diff --git a/Entity/Resource.php b/Entity/Resource.php index 8c10d23..ca66734 100644 --- a/Entity/Resource.php +++ b/Entity/Resource.php @@ -39,7 +39,7 @@ class Resource { * * @param string $path The resource path */ - public function __construct(private User $user, private string $path) { + public function __construct(private Album $album, private User $user, private string $path) { $this->created = new \DateTime('now'); $this->updated = new \DateTime('now'); } @@ -53,10 +53,32 @@ class Resource { return $this->id; } + /** + * Set album + * + * @param \Rapsys\TreeBundle\Entity\Album $album + * + * @return Resource + */ + public function setAlbum(Album $album): Resource { + $this->album = $album; + + return $this; + } + + /** + * Get album + * + * @return \Rapsys\TreeBundle\Entity\Album + */ + public function getAlbum(): Album { + return $this->album; + } + /** * Set user * - * @param \Rapsys\BlogBundle\Entity\User $user + * @param \Rapsys\TreeBundle\Entity\User $user * * @return Resource */ @@ -69,7 +91,7 @@ class Resource { /** * Get user * - * @return \Rapsys\BlogBundle\Entity\User + * @return \Rapsys\TreeBundle\Entity\User */ public function getUser(): User { return $this->user;