コード例 #1
0
ファイル: User.php プロジェクト: Tekstove/Tekstove-api
 /**
  * Method called to associate a ChildArtist object to this object
  * through the ChildArtist foreign key attribute.
  *
  * @param  ChildArtist $l ChildArtist
  * @return $this|\Tekstove\ApiBundle\Model\User The current object (for fluent API support)
  */
 public function addArtist(ChildArtist $l)
 {
     if ($this->collArtists === null) {
         $this->initArtists();
         $this->collArtistsPartial = true;
     }
     if (!$this->collArtists->contains($l)) {
         $this->doAddArtist($l);
         if ($this->artistsScheduledForDeletion and $this->artistsScheduledForDeletion->contains($l)) {
             $this->artistsScheduledForDeletion->remove($this->artistsScheduledForDeletion->search($l));
         }
     }
     return $this;
 }