src/Entity/Users/Adminuser/Parametre.php line 17

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Users\Adminuser;
  3. use App\Repository\Users\Adminuser\ParametreRepository;
  4. use App\Entity\Users\Adminuser\Parametreitem;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use App\Entity\Users\User\User;
  7. use Symfony\Component\HttpFoundation\File\File;
  8. use Vich\UploaderBundle\Mapping\Annotation as Vich;
  9. /**
  10.  * @ORM\Table(name="`parametre`")
  11.  * @ORM\Entity(repositoryClass=ParametreRepository::class)
  12.  * @Vich\Uploadable
  13.  */
  14. class Parametre
  15. {
  16.     /**
  17.      * @ORM\Id
  18.      * @ORM\GeneratedValue
  19.      * @ORM\Column(type="integer")
  20.      */
  21.     private $id;
  22.     /**
  23.      * @ORM\Column(type="string", length=255, nullable=true)
  24.      */
  25.     private $description;
  26.     /**
  27.      * @ORM\Column(type="string", length=255)
  28.      */
  29.     private $typeParam;
  30.     /**
  31.      * @var text
  32.      *
  33.      * @ORM\Column(name="valeur", type="text", nullable=true)
  34.      */
  35.     private $valeur;
  36.     /**
  37.      * @var text
  38.      *
  39.      * @ORM\Column(name="title", type="text", nullable=true)
  40.      */
  41.     private $title;
  42.     /**
  43.      * @ORM\Column(type="datetime")
  44.      */
  45.     private $createdAt;
  46.     /**
  47.      * @ORM\Column(type="integer")
  48.      */
  49.     private $rang;
  50.     /**
  51.      * @ORM\Column(type="string", length=255, nullable=true)
  52.      */
  53.     public $contentUrl;
  54.     /**
  55.      * @ORM\Column(type="string", length=255, nullable=true)
  56.      */
  57.     private $filePath;
  58.     /**
  59.      * @Vich\UploadableField(mapping="file_intervention", fileNameProperty="filePath", size="imageSize", mimeType="mimeType", originalName="originalName")
  60.      * @var File|null
  61.      */
  62.     public ?File $file null;
  63.     /**
  64.      * @ORM\Column(type="string", length=255, nullable=true)
  65.      */
  66.     private $imageSize;
  67.     /**
  68.      * @ORM\Column(type="string", length=255, nullable=true)
  69.      */
  70.     private $originalName;
  71.     /**
  72.      * @ORM\Column(type="string", length=255, nullable=true)
  73.      */
  74.     private $mimeType;
  75.     /**
  76.      * @ORM\ManyToOne(targetEntity=User::class)
  77.      */
  78.     private $user;
  79.     private $em;
  80.     /**
  81.      * @ORM\Column(type="string", length=255, nullable=true)
  82.      */
  83.     private $link;
  84.     public function __construct()
  85.     {
  86.         $this->createdAt = new \Datetime();
  87.         $this->imgNumber 0;
  88.         $this->rang 0;
  89.     }
  90.     public function getEm()
  91.     {
  92.         return $this->em;
  93.     }
  94.     public function setEm($em)
  95.     {
  96.         return $this->em $em;
  97.     }
  98.     public function getId(): ?int
  99.     {
  100.         return $this->id;
  101.     }
  102.     public function getDescription(): ?string
  103.     {
  104.         return $this->description;
  105.     }
  106.     public function setDescription(?string $description): self
  107.     {
  108.         $this->description $description;
  109.         return $this;
  110.     }
  111.     public function getCreatedAt(): ?\DateTimeInterface
  112.     {
  113.         return $this->createdAt;
  114.     }
  115.     public function setCreatedAt(\DateTimeInterface $createdAt): self
  116.     {
  117.         $this->createdAt $createdAt;
  118.         return $this;
  119.     }
  120.     public function getRang(): ?int
  121.     {
  122.         return $this->rang;
  123.     }
  124.     public function setRang(int $rang): self
  125.     {
  126.         $this->rang $rang;
  127.         return $this;
  128.     }
  129.     public function getFirstItems()
  130.     {
  131.         $repository $this->em->getRepository(Parametreitem::class);
  132.         $parametres_items $repository->findBy(array('parametre'=>$this));
  133.         return $parametres_items;
  134.     }
  135.     public function getContentUrl(): ?string
  136.     {
  137.         return $this->contentUrl;
  138.     }
  139.     public function setContentUrl(?string $contentUrl): self
  140.     {
  141.         $this->contentUrl $contentUrl;
  142.         return $this;
  143.     }
  144.     public function getFilePath(): ?string
  145.     {
  146.         return $this->filePath;
  147.     }
  148.     public function setFilePath(?string $filePath): self
  149.     {
  150.         $this->filePath $filePath;
  151.         return $this;
  152.     }
  153.     public function getImageSize(): ?string
  154.     {
  155.         return $this->imageSize;
  156.     }
  157.     public function setImageSize(?string $imageSize): self
  158.     {
  159.         $this->imageSize $imageSize;
  160.         return $this;
  161.     }
  162.     public function getOriginalName(): ?string
  163.     {
  164.         return $this->originalName;
  165.     }
  166.     public function setOriginalName(?string $originalName): self
  167.     {
  168.         $this->originalName $originalName;
  169.         return $this;
  170.     }
  171.     public function getMimeType(): ?string
  172.     {
  173.         return $this->mimeType;
  174.     }
  175.     public function setMimeType(string $mimeType): self
  176.     {
  177.         $this->mimeType $mimeType;
  178.         return $this;
  179.     }
  180.     /**
  181.      * Set valeur
  182.      *
  183.      * @param string $valeur
  184.      * @return Parametreadmin
  185.      */
  186.     public function setValeur($valeur)
  187.     {
  188.         $this->valeur $valeur;
  189.         return $this;
  190.     }
  191.     /**
  192.      * Get valeur
  193.      *
  194.      * @return string 
  195.      */
  196.     public function getValeur()
  197.     {
  198.         return $this->valeur;
  199.     }
  200.     public function getUser(): ?User
  201.     {
  202.         return $this->user;
  203.     }
  204.     public function setUser(?User $user): self
  205.     {
  206.         $this->user $user;
  207.         return $this;
  208.     }
  209.     public function getTypeParam(): ?string
  210.     {
  211.         return $this->typeParam;
  212.     }
  213.     public function setTypeParam(string $typeParam): self
  214.     {
  215.         $this->typeParam $typeParam;
  216.         return $this;
  217.     }
  218.     /**
  219.      * Get the value of title
  220.      */ 
  221.     public function getTitle()
  222.     {
  223.         return $this->title;
  224.     }
  225.     /**
  226.      * Set the value of title
  227.      *
  228.      * @return  self
  229.      */ 
  230.     public function setTitle($title)
  231.     {
  232.         $this->title $title;
  233.         return $this;
  234.     }
  235.     public function getLink(): ?string
  236.     {
  237.         return $this->link;
  238.     }
  239.     public function setLink(?string $link): self
  240.     {
  241.         $this->link $link;
  242.         return $this;
  243.     }
  244. }