public function addCategory(ChildCategory $l)
    {
        if ($this->collCategories === null) {
            $this->initCategories();
            $this->collCategoriesPartial = true;
        }

        if (!$this->collCategories->contains($l)) {
            $this->doAddCategory($l);

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

        return $this;
    }
public function addCategory(ChildCategory $l)
    {
        if ($this->collCategories === null) {
            $this->initCategories();
            $this->collCategoriesPartial = true;
        }

        if (!$this->collCategories->contains($l)) {
            $this->doAddCategory($l);

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

        return $this;
    }
public function addCategory ( ChildCategory $ l ) { if ( $ this -> collCategories === null ) { $ this -> initCategories ( ) ; $ this -> collCategoriesPartial = true ; } if ( ! $ this -> collCategories -> contains ( $ l ) ) { $ this -> doAddCategory ( $ l ) ; if ( $ this -> categoriesScheduledForDeletion and $ this -> categoriesScheduledForDeletion -> contains ( $ l ) ) { $ this -> categoriesScheduledForDeletion -> remove ( $ this -> categoriesScheduledForDeletion -> search ( $ l ) ) ; } } return $ this ; }
Method called to associate a ChildCategory object to this object
through the ChildCategory foreign key attribute.

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