<?php
namespace Pfe\CometaBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* Categorie
*
* @ORM\Table()
* @ORM\Entity(repositoryClass="Pfe\CometaBundle\Entity\CategorieRepository")
*/
class Categorie
{
/**
* @var integer
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @var string
*
* @ORM\Column(name="libelle_categorie", type="string", length=255)
*/
private $libelleCategorie;
/**
*@ORM\OneToMany(targetEntity="Produit", mappedBy="Categorie")
*/
private $produits;
public function __construct()
{
$this->produits= new \Doctrine\Common\Collections\ArrayCollection();
}
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Set libelleCategorie
*
* @param string $libelleCategorie
* @return Categorie
*/
public function setLibelleCategorie($libelleCategorie)
{
$this->libelleCategorie = $libelleCategorie;
return $this;
}
/**
* Get libelleCategorie
*
* @return string
*/
public function getLibelleCategorie()
{
return $this->libelleCategorie;
}
/**
* Add produits
*
* @param \Pfe\CometaBundle\Entity\Produit $produits
* @return Categorie
*/
public function addProduit(\Pfe\CometaBundle\Entity\Produit $produits)
{
$this->produits[] = $produits;
return $this;
}
/**
* Remove produits
*
* @param \Pfe\CometaBundle\Entity\Produit $produits
*/
public function removeProduit(\Pfe\CometaBundle\Entity\Produit $produits)
{
$this->produits->removeElement($produits);
}
/**
* Get produits
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getProduits()
{
return $this->produits;
}
}