]> Raphaƫl G. Git Repositories - treebundle/blobdiff - Entity/Album.php
Add element repository class with findOneByUidIdPathAsArray method
[treebundle] / Entity / Album.php
index 0cf9b33ce05978c59023b559f2652b990e70e8a8..0a812f88e799bd7f3c80ea4a799daf1bb58238cd 100644 (file)
@@ -37,22 +37,21 @@ class Album {
        /**
         * @var \Doctrine\Common\Collections\Collection
         */
        /**
         * @var \Doctrine\Common\Collections\Collection
         */
-       private Collection $resources;
+       private Collection $elements;
 
        /**
         * Constructor
         *
         * @param string $path The album path
         * @param string $slug The album slug
 
        /**
         * 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
                //Set defaults
                $this->created = new \DateTime('now');
                $this->updated = new \DateTime('now');
 
                //Set collections
-               $this->resources = new ArrayCollection();
+               $this->elements = new ArrayCollection();
        }
 
        /**
        }
 
        /**
@@ -108,28 +107,6 @@ class Album {
                return $this->slug;
        }
 
                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
         *
        /**
         * Set created
         *
@@ -175,36 +152,36 @@ class Album {
        }
 
        /**
        }
 
        /**
-        * Add resource
+        * Add element
         *
         *
-        * @param Resource $resource
+        * @param Element $element
         *
         * @return User
         */
         *
         * @return User
         */
-       public function addResource(Resource $resource): User {
-               $this->resources[] = $resource;
+       public function addElement(Element $element): User {
+               $this->elements[] = $element;
 
                return $this;
        }
 
        /**
 
                return $this;
        }
 
        /**
-        * Remove resource
+        * Remove element
         *
         *
-        * @param Resource $resource
+        * @param Element $element
         *
         * @return \Doctrine\Common\Collections\Collection
         */
         *
         * @return \Doctrine\Common\Collections\Collection
         */
-       public function removeResource(Resource $resource): Collection {
-               return $this->resources->removeElement($resource);
+       public function removeElement(Element $element): Collection {
+               return $this->elements->removeElement($element);
        }
 
        /**
        }
 
        /**
-        * Get resources
+        * Get elements
         *
         * @return \Doctrine\Common\Collections\Collection
         */
         *
         * @return \Doctrine\Common\Collections\Collection
         */
-       public function getResources(): Collection {
-               return $this->resources;
+       public function getElements(): Collection {
+               return $this->elements;
        }
 
        /**
        }
 
        /**