Ejemplo n.º 1
0
 /**
  * Method called to associate a ChildSession object to this object
  * through the ChildSession foreign key attribute.
  *
  * @param  ChildSession $l ChildSession
  * @return $this|\CyberdenBundle\Model\Station The current object (for fluent API support)
  */
 public function addSession(ChildSession $l)
 {
     if ($this->collSessions === null) {
         $this->initSessions();
         $this->collSessionsPartial = true;
     }
     if (!$this->collSessions->contains($l)) {
         $this->doAddSession($l);
         if ($this->sessionsScheduledForDeletion and $this->sessionsScheduledForDeletion->contains($l)) {
             $this->sessionsScheduledForDeletion->remove($this->sessionsScheduledForDeletion->search($l));
         }
     }
     return $this;
 }