public function addMedia(ChildMedia $l)
    {
        if ($this->collMedias === null) {
            $this->initMedias();
            $this->collMediasPartial = true;
        }

        if (!$this->collMedias->contains($l)) {
            $this->doAddMedia($l);

            if ($this->mediasScheduledForDeletion and $this->mediasScheduledForDeletion->contains($l)) {
                $this->mediasScheduledForDeletion->remove($this->mediasScheduledForDeletion->search($l));
            }
        }

        return $this;
    }
public function addMedia(ChildMedia $l)
    {
        if ($this->collMedias === null) {
            $this->initMedias();
            $this->collMediasPartial = true;
        }

        if (!$this->collMedias->contains($l)) {
            $this->doAddMedia($l);

            if ($this->mediasScheduledForDeletion and $this->mediasScheduledForDeletion->contains($l)) {
                $this->mediasScheduledForDeletion->remove($this->mediasScheduledForDeletion->search($l));
            }
        }

        return $this;
    }
public function addMedia ( ChildMedia $ l ) { if ( $ this -> collMedias === null ) { $ this -> initMedias ( ) ; $ this -> collMediasPartial = true ; } if ( ! $ this -> collMedias -> contains ( $ l ) ) { $ this -> doAddMedia ( $ l ) ; if ( $ this -> mediasScheduledForDeletion and $ this -> mediasScheduledForDeletion -> contains ( $ l ) ) { $ this -> mediasScheduledForDeletion -> remove ( $ this -> mediasScheduledForDeletion -> search ( $ l ) ) ; } } return $ this ; }
Method called to associate a ChildMedia object to this object
through the ChildMedia foreign key attribute.

@param  ChildMedia $l ChildMedia
@return $this|\Attogram\SharedMedia\Orm\Source The current object (for fluent API support)
Method called to associate a ChildMedia object to this object through the ChildMedia foreign key attribute .