/** * @param Category $category */ public function addCategory($category) { if (!$this->categories->contains($category)) { $category->addCompany($this); $this->categories[] = $category; } }
/** * @param Category $category * * @return $this */ public function removeChildCategory(Category $category) { if ($this->childCategories->contains($category)) { $this->childCategories->removeElement($category); } return $this; }
/** * Remove a category in the product association. * (Owning side). * * @param Category $category The category to disassociate */ public function removeCategory($category) { $category->removeProduct($this); $this->categories->removeElement($category); }
public function getSubResources(EntityManager $entityManager) { return $this->children->toArray(); }
public function getSubResources(EntityManager $entityManager) { return array_merge($this->children->toArray(), $this->articles->toArray()); }
/** * Removes child category. * * @param Category $category * * @return Category */ public function removeChild(Category $category) { $this->children->removeElement($category); return $this; }
/** * @param Category $category */ public function removeCategory(Category $category) { $this->categories->removeElement($category); }
/** * Remove category * * @param \AppBundle\Entity\Category $category */ public function removeCategory(\AppBundle\Entity\Category $category) { $this->categories->removeElement($category); }
/** * Remove child * * @param \ShopBundle\Entity\Category $child */ public function removeChild(\ShopBundle\Entity\Category $child) { $this->children->removeElement($child); }