src/Entity/Feed/FeedElementType.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Feed;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. /**
  6.  * FeedElementType
  7.  *
  8.  * @ORM\Table(name="tam_feed_element_type")
  9.  * @ORM\Entity(repositoryClass="App\Repository\Feed\FeedElementTypeRepository")
  10.  */
  11. class FeedElementType
  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.      * @var string
  31.      *
  32.      * @ORM\Column(name="code_translate", type="string", length=255, nullable=false)
  33.      */
  34.     private $codeTranslate;
  35.     
  36.     /**
  37.      * @var string
  38.      *
  39.      * @ORM\Column(name="description", type="text", nullable=true)
  40.      */
  41.     private $description;
  42.     
  43.     /**
  44.      * @var string
  45.      *
  46.      * @ORM\Column(name="description_code_translate", type="string", length=255, nullable=false)
  47.      */
  48.     private $descriptionCodeTranslate;
  49.     
  50.     /**
  51.      * @var boolean
  52.      *
  53.      * @ORM\Column(name="available_for_player", type="boolean", options={"default": FALSE})
  54.      */
  55.     private $availableForPlayer;
  56.     
  57.     /**
  58.      * @var boolean
  59.      *
  60.      * @ORM\Column(name="available_for_club", type="boolean", options={"default": FALSE})
  61.      */
  62.     private $availableForClub;
  63.     
  64.     /**
  65.      * @var boolean
  66.      *
  67.      * @ORM\Column(name="available_for_pro", type="boolean", options={"default": FALSE})
  68.      */
  69.     private $availableForPro;
  70.     
  71.     /**
  72.      * @var integer
  73.      *
  74.      * @ORM\Column(name="indice", type="integer", options={"default": 0})
  75.      */
  76.     private $indice;
  77.     
  78.     /**
  79.      * @var boolean
  80.      *
  81.      * @ORM\Column(name="deleted", type="boolean", options={"default": FALSE})
  82.      */
  83.     private $deleted;
  84.     
  85.     /**
  86.      * @var \DateTime
  87.      *
  88.      * @ORM\Column(name="date_deleted", type="datetime", nullable=true)
  89.      */
  90.     private $dateDeleted;
  91.     
  92.     /**
  93.      * @var ArrayCollection
  94.      *
  95.      * @ORM\OneToMany(targetEntity="\App\Entity\Feed\FeedElement", mappedBy="feedElementType", cascade={"persist"}, orphanRemoval=true)
  96.      */
  97.     private $feedElements;
  98.     
  99.     public function __construct()
  100.     {
  101.         $this->feedElements = new ArrayCollection();
  102.         $this->availableForPlayer false;
  103.         $this->availableForClub false;
  104.         $this->availableForPro false;
  105.         $this->deleted false;
  106.     }
  107.     /**
  108.      * Get id
  109.      *
  110.      * @return int
  111.      */
  112.     public function getId()
  113.     {
  114.         return $this->id;
  115.     }
  116.     
  117.     /**
  118.      * Set label
  119.      *
  120.      * @param string $label
  121.      *
  122.      * @return FeedElementType
  123.      */
  124.     public function setLabel($label)
  125.     {
  126.         $this->label $label;
  127.         return $this;
  128.     }
  129.     /**
  130.      * Get label
  131.      *
  132.      * @return string
  133.      */
  134.     public function getLabel()
  135.     {
  136.         return $this->label;
  137.     }
  138.     
  139.     /**
  140.      * Set codeTranslate
  141.      *
  142.      * @param string $codeTranslate
  143.      *
  144.      * @return FeedElementType
  145.      */
  146.     public function setCodeTranslate($codeTranslate)
  147.     {
  148.         $this->codeTranslate $codeTranslate;
  149.         return $this;
  150.     }
  151.     /**
  152.      * Get codeTranslate
  153.      *
  154.      * @return string
  155.      */
  156.     public function getCodeTranslate()
  157.     {
  158.         return $this->codeTranslate;
  159.     }
  160.     
  161.     /**
  162.      * Set description
  163.      *
  164.      * @param string $description
  165.      *
  166.      * @return FeedElementType
  167.      */
  168.     public function setDescription($description)
  169.     {
  170.         $this->description $description;
  171.         return $this;
  172.     }
  173.     /**
  174.      * Get description
  175.      *
  176.      * @return string
  177.      */
  178.     public function getDescription()
  179.     {
  180.         return $this->description;
  181.     }
  182.     
  183.     /**
  184.      * Set descriptionCodeTranslate
  185.      *
  186.      * @param string $descriptionCodeTranslate
  187.      *
  188.      * @return FeedElementType
  189.      */
  190.     public function setDescriptionCodeTranslate($descriptionCodeTranslate)
  191.     {
  192.         $this->descriptionCodeTranslate $descriptionCodeTranslate;
  193.         return $this;
  194.     }
  195.     /**
  196.      * Get descriptionCodeTranslate
  197.      *
  198.      * @return string
  199.      */
  200.     public function getDescriptionCodeTranslate()
  201.     {
  202.         return $this->descriptionCodeTranslate;
  203.     }
  204.     
  205.     /**
  206.      * Set availableForPlayer
  207.      *
  208.      * @param boolean $availableForPlayer
  209.      *
  210.      * @return FeedElementType
  211.      */
  212.     public function setAvailableForPlayer($availableForPlayer)
  213.     {
  214.         $this->availableForPlayer $availableForPlayer;
  215.         return $this;
  216.     }
  217.     /**
  218.      * Get availableForPlayer
  219.      *
  220.      * @return boolean
  221.      */
  222.     public function getAvailableForPlayer()
  223.     {
  224.         return $this->availableForPlayer;
  225.     }
  226.     
  227.     /**
  228.      * Set availableForClub
  229.      *
  230.      * @param boolean $availableForClub
  231.      *
  232.      * @return FeedElementType
  233.      */
  234.     public function setAvailableForClub($availableForClub)
  235.     {
  236.         $this->availableForClub $availableForClub;
  237.         return $this;
  238.     }
  239.     /**
  240.      * Get availableForClub
  241.      *
  242.      * @return boolean
  243.      */
  244.     public function getAvailableForClub()
  245.     {
  246.         return $this->availableForClub;
  247.     }
  248.     
  249.     /**
  250.      * Set availableForPro
  251.      *
  252.      * @param boolean $availableForPro
  253.      *
  254.      * @return FeedElementType
  255.      */
  256.     public function setAvailableForPro($availableForPro)
  257.     {
  258.         $this->availableForPro $availableForPro;
  259.         return $this;
  260.     }
  261.     /**
  262.      * Get availableForPro
  263.      *
  264.      * @return boolean
  265.      */
  266.     public function getAvailableForPro()
  267.     {
  268.         return $this->availableForPro;
  269.     }
  270.     
  271.     /**
  272.      * Set indice
  273.      *
  274.      * @param integer $indice
  275.      *
  276.      * @return FeedElementType
  277.      */
  278.     public function setIndice($indice)
  279.     {
  280.         $this->indice $indice;
  281.         return $this;
  282.     }
  283.     /**
  284.      * Get indice
  285.      *
  286.      * @return integer
  287.      */
  288.     public function getIndice()
  289.     {
  290.         return $this->indice;
  291.     }
  292.     
  293.     /**
  294.      * Set deleted
  295.      *
  296.      * @param boolean $deleted
  297.      *
  298.      * @return FeedElementType
  299.      */
  300.     public function setDeleted($deleted)
  301.     {
  302.         $this->deleted $deleted;
  303.         return $this;
  304.     }
  305.     /**
  306.      * Get deleted
  307.      *
  308.      * @return boolean
  309.      */
  310.     public function getDeleted()
  311.     {
  312.         return $this->deleted;
  313.     }
  314.     
  315.     
  316.     /**
  317.      * Set dateDeleted
  318.      *
  319.      * @param \DateTime $dateDeleted
  320.      *
  321.      * @return FeedElementType
  322.      */
  323.     public function setDateDeleted($datedeleted)
  324.     {
  325.         $this->dateDeleted $datedeleted;
  326.         return $this;
  327.     }
  328.     /**
  329.      * Get dateDeleted
  330.      *
  331.      * @return \DateTime
  332.      */
  333.     public function getDateDeleted()
  334.     {
  335.         return $this->dateDeleted;
  336.     }
  337.     
  338.     
  339.     /**
  340.      * Add feedElement
  341.      *
  342.      * @param \App\Entity\Feed\FeedElement $feedElement
  343.      *
  344.      * @return FeedElementType
  345.      */
  346.     public function addFeedElement(\App\Entity\Feed\FeedElement $feedElement)
  347.     {
  348.         $this->feedElements[] = $feedElement;
  349.         return $this;
  350.     }
  351.     /**
  352.      * Remove feedElement
  353.      *
  354.      * @param \App\Entity\Feed\FeedElement $feedElement
  355.      */
  356.     public function removeFeedElement(\App\Entity\Feed\FeedElement $feedElement)
  357.     {
  358.         $this->feedElements->removeElement($feedElement);
  359.     }
  360.     /**
  361.      * Get feedElements
  362.      *
  363.      * @return \Doctrine\Common\Collections\Collection
  364.      */
  365.     public function getFeedElements()
  366.     {
  367.         return $this->feedElements;
  368.     }
  369.     
  370.     /***********************
  371.      * OTHER FUNCTION
  372.      ***********************/
  373.     
  374.     public function getArrayForJson(){
  375.         $array = array();
  376.         $array['id'] = $this->getId();
  377.         $array['label'] = $this->getLabel();
  378.         $array['codeTranslate'] = $this->getCodeTranslate();
  379.         
  380.         return $array;
  381.         
  382.     }
  383.     
  384.     
  385. }