src/AppBundle/Entity/Affiliate.php
/**
     * Add categories
     *
     * @param Category $categories
     * @return Affiliate
     */
Add categories
@param Category $categories
@return Affiliate
Add categories @param Category $categories @return Affiliate
public function addCategory(Category $categories)
    {
        $this->categories[] = $categories;
        return $this;
    }
public function addCategory ( Category $ categories ) { $ this -> categories [ ] = $ categories ; return $ this ; }
Add categories
 @param Category $categories
 @return Affiliate
Add categories @param Category $categories @return Affiliate