Example #1
0
 /**
  * Method called to associate a ChildNews object to this object
  * through the ChildNews foreign key attribute.
  *
  * @param  ChildNews $l ChildNews
  * @return $this|\App\Propel\File The current object (for fluent API support)
  */
 public function addNews(ChildNews $l)
 {
     if ($this->collNews === null) {
         $this->initNews();
         $this->collNewsPartial = true;
     }
     if (!$this->collNews->contains($l)) {
         $this->doAddNews($l);
         if ($this->newsScheduledForDeletion and $this->newsScheduledForDeletion->contains($l)) {
             $this->newsScheduledForDeletion->remove($this->newsScheduledForDeletion->search($l));
         }
     }
     return $this;
 }