Rapsys Git
/
treebundle
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
169f1fd
)
Add album reference
author
Raphaël Gertz
<git@rapsys.eu>
Sat, 2 Nov 2024 03:53:35 +0000
(
04:53
+0100)
committer
Raphaël Gertz
<git@rapsys.eu>
Sat, 2 Nov 2024 03:53:35 +0000
(
04:53
+0100)
Cleanup
Entity/Resource.php
patch
|
blob
|
history
diff --git
a/Entity/Resource.php
b/Entity/Resource.php
index 8c10d236e0dca04cc2ab9ac06fe85180c2b98be0..ca66734554a804768e3c9bb2f071ab9b1b042504 100644
(file)
--- a/
Entity/Resource.php
+++ b/
Entity/Resource.php
@@
-39,7
+39,7
@@
class Resource {
*
* @param string $path The resource path
*/
*
* @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');
}
$this->created = new \DateTime('now');
$this->updated = new \DateTime('now');
}
@@
-53,10
+53,32
@@
class Resource {
return $this->id;
}
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
*
/**
* Set user
*
- * @param \Rapsys\
Blog
Bundle\Entity\User $user
+ * @param \Rapsys\
Tree
Bundle\Entity\User $user
*
* @return Resource
*/
*
* @return Resource
*/
@@
-69,7
+91,7
@@
class Resource {
/**
* Get user
*
/**
* Get user
*
- * @return \Rapsys\
Blog
Bundle\Entity\User
+ * @return \Rapsys\
Tree
Bundle\Entity\User
*/
public function getUser(): User {
return $this->user;
*/
public function getUser(): User {
return $this->user;