Skip to content

Instantly share code, notes, and snippets.

@pjedrzejewski
Created September 25, 2011 18:57
Show Gist options
  • Save pjedrzejewski/1240962 to your computer and use it in GitHub Desktop.
Save pjedrzejewski/1240962 to your computer and use it in GitHub Desktop.
Easy categorizing with Symfony2, gist #4.
<?php
namespace Application\Bundle\AssortmentBundle\Entity;
use Sylius\Bundle\CatalogBundle\Model\CategoryInterface;
use Sylius\Bundle\AssortmentBundle\Entity\Product as BaseProduct;
class Product extends BaseProduct
{
protected $category;
public function getCategory()
{
return $this->category;
}
public function setCategory(CategoryInterface $category)
{
$this->category = $category;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment