Esempio n. 1
0
 /**
  * Method called to associate a ChildFormats object to this object
  * through the ChildFormats foreign key attribute.
  *
  * @param  ChildFormats $l ChildFormats
  * @return $this|\Books The current object (for fluent API support)
  */
 public function addFormats(ChildFormats $l)
 {
     if ($this->collFormatss === null) {
         $this->initFormatss();
         $this->collFormatssPartial = true;
     }
     if (!$this->collFormatss->contains($l)) {
         $this->doAddFormats($l);
         if ($this->formatssScheduledForDeletion and $this->formatssScheduledForDeletion->contains($l)) {
             $this->formatssScheduledForDeletion->remove($this->formatssScheduledForDeletion->search($l));
         }
     }
     return $this;
 }