src/Entity/ProductDeclinaison.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\SonataClassificationTag;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\ORM\Mapping as ORM;
  6. /**
  7.  * ProductDeclinaison
  8.  *
  9.  * @ORM\Table(name="product_declinaison")
  10.  * @ORM\Entity(repositoryClass="App\Repository\ProductDeclinaisonRepository")
  11.  */
  12. class ProductDeclinaison
  13. {
  14.     /**
  15.      * @var int
  16.      *
  17.      * @ORM\Column(name="id", type="integer")
  18.      * @ORM\Id
  19.      * @ORM\GeneratedValue(strategy="AUTO")
  20.      */
  21.     private $id;
  22.     /**
  23.      * @ORM\ManyToOne(targetEntity="App\Entity\Product", inversedBy="declinaison")
  24.      */
  25.     private $product;
  26.     /**
  27.      * @var string
  28.      *
  29.      * @ORM\Column(name="tagline", type="string", length=200)
  30.      */
  31.     private $tagline;
  32.     /**
  33.      * @ORM\ManyToMany(targetEntity="App\Entity\SonataClassificationTag")
  34.      */
  35.     private $userProfile;
  36.     /**
  37.      * @var int
  38.      * @ORM\Column(name="position", type="integer")
  39.      */
  40.     private $position;
  41.     /**
  42.      * Constructor
  43.      */
  44.     public function __construct()
  45.     {
  46.         $this->userProfile = new ArrayCollection();
  47.     }
  48.     /**
  49.      * Get id
  50.      *
  51.      * @return integer
  52.      */
  53.     public function getId()
  54.     {
  55.         return $this->id;
  56.     }
  57.     /**
  58.      * Get tagline
  59.      *
  60.      * @return string
  61.      */
  62.     public function getTagline()
  63.     {
  64.         return $this->tagline;
  65.     }
  66.     /**
  67.      * Set tagline
  68.      *
  69.      * @param string $tagline
  70.      *
  71.      * @return ProductDeclinaison
  72.      */
  73.     public function setTagline($tagline)
  74.     {
  75.         $this->tagline $tagline;
  76.         return $this;
  77.     }
  78.     /**
  79.      * Get product
  80.      *
  81.      * @return Product
  82.      */
  83.     public function getProduct()
  84.     {
  85.         return $this->product;
  86.     }
  87.     /**
  88.      * Set product
  89.      *
  90.      * @param Product $product
  91.      *
  92.      * @return ProductDeclinaison
  93.      */
  94.     public function setProduct(Product $product null)
  95.     {
  96.         $this->product $product;
  97.         return $this;
  98.     }
  99.     /**
  100.      * Get userProfile
  101.      *
  102.      * @return ArrayCollection
  103.      */
  104.     public function getUserProfile()
  105.     {
  106.         return $this->userProfile;
  107.     }
  108.     /**
  109.      * Get position
  110.      *
  111.      * @return integer
  112.      */
  113.     public function getPosition()
  114.     {
  115.         return $this->position;
  116.     }
  117.     /**
  118.      * Set position
  119.      *
  120.      * @param integer $position
  121.      *
  122.      * @return ProductDeclinaison
  123.      */
  124.     public function setPosition($position)
  125.     {
  126.         $this->position $position;
  127.         return $this;
  128.     }
  129.     /**
  130.      * Add userProfile
  131.      *
  132.      * @param SonataClassificationTag $userProfile
  133.      *
  134.      * @return ProductDeclinaison
  135.      */
  136.     public function addUserProfile(SonataClassificationTag $userProfile)
  137.     {
  138.         $this->userProfile[] = $userProfile;
  139.         return $this;
  140.     }
  141.     /**
  142.      * Remove userProfile
  143.      *
  144.      * @param SonataClassificationTag $userProfile
  145.      */
  146.     public function removeUserProfile(SonataClassificationTag $userProfile)
  147.     {
  148.         $this->userProfile->removeElement($userProfile);
  149.     }
  150. }