public function addSubCategory(CategoryInterface $category)
    {
        if (!$this
            ->subCategories
            ->contains($category)
        ) {
            $this
                ->subCategories
                ->add($category);
        }

        return $this;
    }
public function addSubCategory(CategoryInterface $category)
    {
        if (!$this
            ->subCategories
            ->contains($category)
        ) {
            $this
                ->subCategories
                ->add($category);
        }

        return $this;
    }
public function addSubCategory ( CategoryInterface $ category ) { if ( ! $ this -> subCategories -> contains ( $ category ) ) { $ this -> subCategories -> add ( $ category ) ; } return $ this ; }
Add Subcategory.

@param CategoryInterface $category Category to add as subcategory

@return $this Self object
Add Subcategory .