/** * Method called to associate a ChildFile object to this object * through the ChildFile foreign key attribute. * * @param ChildFile $l ChildFile * @return $this|\Models\Pack The current object (for fluent API support) */ public function addFile(ChildFile $l) { if ($this->collFiles === null) { $this->initFiles(); $this->collFilesPartial = true; } if (!$this->collFiles->contains($l)) { $this->doAddFile($l); if ($this->filesScheduledForDeletion and $this->filesScheduledForDeletion->contains($l)) { $this->filesScheduledForDeletion->remove($this->filesScheduledForDeletion->search($l)); } } return $this; }