Ejemplo n.º 1
0
 /**
  * @param Category $category
  */
 public function addCategory($category)
 {
     if (!$this->categories->contains($category)) {
         $category->addCompany($this);
         $this->categories[] = $category;
     }
 }
Ejemplo n.º 2
0
 /**
  * @param Category $category
  *
  * @return $this
  */
 public function removeChildCategory(Category $category)
 {
     if ($this->childCategories->contains($category)) {
         $this->childCategories->removeElement($category);
     }
     return $this;
 }
Ejemplo n.º 3
0
 /**
  * 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);
 }
Ejemplo n.º 4
0
 public function getSubResources(EntityManager $entityManager)
 {
     return $this->children->toArray();
 }
Ejemplo n.º 5
0
 public function getSubResources(EntityManager $entityManager)
 {
     return array_merge($this->children->toArray(), $this->articles->toArray());
 }
Ejemplo n.º 6
0
 /**
  * Removes child category.
  *
  * @param Category $category
  *
  * @return Category
  */
 public function removeChild(Category $category)
 {
     $this->children->removeElement($category);
     return $this;
 }
Ejemplo n.º 7
0
 /**
  * @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);
 }
Ejemplo n.º 9
0
 /**
  * Remove child
  *
  * @param \ShopBundle\Entity\Category $child
  */
 public function removeChild(\ShopBundle\Entity\Category $child)
 {
     $this->children->removeElement($child);
 }