public function addM2P(ChildM2P $l)
    {
        if ($this->collM2Ps === null) {
            $this->initM2Ps();
            $this->collM2PsPartial = true;
        }

        if (!$this->collM2Ps->contains($l)) {
            $this->doAddM2P($l);

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

        return $this;
    }
public function addM2P(ChildM2P $l)
    {
        if ($this->collM2Ps === null) {
            $this->initM2Ps();
            $this->collM2PsPartial = true;
        }

        if (!$this->collM2Ps->contains($l)) {
            $this->doAddM2P($l);

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

        return $this;
    }
public function addM2P ( ChildM2P $ l ) { if ( $ this -> collM2Ps === null ) { $ this -> initM2Ps ( ) ; $ this -> collM2PsPartial = true ; } if ( ! $ this -> collM2Ps -> contains ( $ l ) ) { $ this -> doAddM2P ( $ l ) ; if ( $ this -> m2PsScheduledForDeletion and $ this -> m2PsScheduledForDeletion -> contains ( $ l ) ) { $ this -> m2PsScheduledForDeletion -> remove ( $ this -> m2PsScheduledForDeletion -> search ( $ l ) ) ; } } return $ this ; }
Method called to associate a ChildM2P object to this object
through the ChildM2P foreign key attribute.

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