Beispiel #1
0
 /**
  * Method called to associate a ChildGallery object to this object
  * through the ChildGallery foreign key attribute.
  *
  * @param  ChildGallery $l ChildGallery
  * @return $this|\Models\User The current object (for fluent API support)
  */
 public function addGallery(ChildGallery $l)
 {
     if ($this->collGalleries === null) {
         $this->initGalleries();
         $this->collGalleriesPartial = true;
     }
     if (!$this->collGalleries->contains($l)) {
         $this->doAddGallery($l);
         if ($this->galleriesScheduledForDeletion and $this->galleriesScheduledForDeletion->contains($l)) {
             $this->galleriesScheduledForDeletion->remove($this->galleriesScheduledForDeletion->search($l));
         }
     }
     return $this;
 }