src/Entity/Brand/BrandShoe.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Brand;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. /**
  6.  * BrandShoes
  7.  *
  8.  * @ORM\Table(name="tam_brand_shoe")
  9.  * @ORM\Entity(repositoryClass="App\Repository\Brand\BrandShoeRepository")
  10.  */
  11. class BrandShoe
  12. {
  13.     /**
  14.      * @var int
  15.      *
  16.      * @ORM\Column(name="id", type="integer")
  17.      * @ORM\Id
  18.      * @ORM\GeneratedValue(strategy="IDENTITY")
  19.      */
  20.     private $id;
  21.     
  22.     /**
  23.      * @var string
  24.      *
  25.      * @ORM\Column(name="label", type="string", length=255, nullable=true)
  26.      */
  27.     private $label;
  28.     
  29.     
  30.     /**
  31.      * @var string
  32.      *
  33.      * @ORM\Column(name="description", type="text", nullable=true)
  34.      */
  35.     private $description;
  36.     
  37.     /**
  38.      * @var integer
  39.      *
  40.      * @ORM\Column(name="indice", type="integer", options={"default": 0})
  41.      */
  42.     private $indice;
  43.     
  44.     /**
  45.      * @var ArrayCollection $players
  46.      *
  47.      * @ORM\OneToMany(targetEntity="\App\Entity\Player\Player", mappedBy="brandShoe")
  48.      */
  49.     private $players;
  50.     
  51.     /**
  52.      * @var integer
  53.      *
  54.      * @ORM\Column(name="old_id", type="integer", options={"default": 0})
  55.      */
  56.     private $oldId;
  57.     
  58.     
  59.     
  60.     public function __construct()
  61.     {
  62.         $this->players = new ArrayCollection();
  63.     }
  64.     /**
  65.      * Get id
  66.      *
  67.      * @return int
  68.      */
  69.     public function getId()
  70.     {
  71.         return $this->id;
  72.     }
  73.     
  74.     /**
  75.      * Set label
  76.      *
  77.      * @param string $label
  78.      *
  79.      * @return BrandShoe
  80.      */
  81.     public function setLabel($label)
  82.     {
  83.         $this->label $label;
  84.         return $this;
  85.     }
  86.     /**
  87.      * Get label
  88.      *
  89.      * @return string
  90.      */
  91.     public function getLabel()
  92.     {
  93.         return $this->label;
  94.     }
  95.     
  96.     
  97.     /**
  98.      * Set description
  99.      *
  100.      * @param string $description
  101.      *
  102.      * @return BrandShoe
  103.      */
  104.     public function setDescription($description)
  105.     {
  106.         $this->description $description;
  107.         return $this;
  108.     }
  109.     /**
  110.      * Get description
  111.      *
  112.      * @return string
  113.      */
  114.     public function getDescription()
  115.     {
  116.         return $this->description;
  117.     }
  118.     
  119.     
  120.     /**
  121.      * Set indice
  122.      *
  123.      * @param integer $indice
  124.      *
  125.      * @return BrandShoe
  126.      */
  127.     public function setIndice($indice)
  128.     {
  129.         $this->indice $indice;
  130.         return $this;
  131.     }
  132.     /**
  133.      * Get indice
  134.      *
  135.      * @return integer
  136.      */
  137.     public function getIndice()
  138.     {
  139.         return $this->indice;
  140.     }
  141.     
  142.     /**
  143.      * Add player
  144.      *
  145.      * @param \App\Entity\Player\Player $player
  146.      *
  147.      * @return BrandShoe
  148.      */
  149.     public function addPlayer(\App\Entity\Player\Player $player)
  150.     {
  151.         $this->players[] = $player;
  152.         return $this;
  153.     }
  154.     /**
  155.      * Remove player
  156.      *
  157.      * @param \App\Entity\Player\Player $player
  158.      */
  159.     public function removePlayer(\App\Entity\Player\Player $player)
  160.     {
  161.         $this->players->removeElement($player);
  162.     }
  163.     /**
  164.      * Get players
  165.      *
  166.      * @return \Doctrine\Common\Collections\Collection
  167.      */
  168.     public function getPlayers()
  169.     {
  170.         return $this->players;
  171.     }
  172.     
  173.     /**
  174.      * Set oldId
  175.      *
  176.      * @param integer $oldId
  177.      *
  178.      * @return BrandShoe
  179.      */
  180.     public function setOldId($oldId)
  181.     {
  182.         $this->oldId $oldId;
  183.         return $this;
  184.     }
  185.     /**
  186.      * Get oldId
  187.      *
  188.      * @return integer
  189.      */
  190.     public function getOldId()
  191.     {
  192.         return $this->oldId;
  193.     }
  194.     
  195.     
  196.     /***********************
  197.      * OTHER FUNCTION
  198.      ***********************/
  199.     
  200.     public function getArrayForJson(){
  201.         $array = array();
  202.         $array['id'] = $this->getId();
  203.         $array['label'] = $this->getLabel();
  204.         
  205.         return $array;
  206.         
  207.     }
  208.     
  209.     
  210. }