src/Entity/Produit/Service/Team.php line 17

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Produit\Service;
  3. use App\Repository\Produit\Service\TeamRepository;
  4. use Symfony\Component\HttpFoundation\File\File;
  5. use Vich\UploaderBundle\Mapping\Annotation as Vich;
  6. use Symfony\Component\Validator\Constraints as Assert;
  7. use App\Entity\Users\User\User;
  8. use Doctrine\ORM\Mapping as ORM;
  9. /**
  10.  * @ORM\Table(name="`team`")
  11.  * @ORM\Entity(repositoryClass=TeamRepository::class)
  12.  * @Vich\Uploadable
  13. */
  14. class Team
  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.     public $contentUrl;
  26.     /**
  27.      * @ORM\Column(type="string", length=255, nullable=true)
  28.      */
  29.     private $filePath;
  30.     /**
  31.      * @Vich\UploadableField(mapping="team_file", fileNameProperty="filePath", size="imageSize", mimeType="mimeType", originalName="originalName")
  32.      * @var File|null
  33.      */
  34.     public ?File $file null;
  35.     /**
  36.      * @ORM\Column(type="string", length=255, nullable=true)
  37.      */
  38.     private $imageSize;
  39.     /**
  40.      * @ORM\Column(type="string", length=255, nullable=true)
  41.      */
  42.     private $originalName;
  43.     /**
  44.      * @ORM\Column(type="datetime")
  45.      */
  46.     private $date;
  47.     /**
  48.      * @ORM\Column(type="string", length=255, nullable=true)
  49.      */
  50.     private $mimeType;
  51.     /**
  52.      * @ORM\ManyToOne(targetEntity=User::class)
  53.      * @ORM\JoinColumn(nullable=false)
  54.      */
  55.     private $user;
  56.     /**
  57.      * @ORM\Column(type="string", length=255)
  58.      */
  59.     private $autorName;
  60.     /**
  61.      * @ORM\Column(type="string", length=255, nullable=true)
  62.      */
  63.     private $autorPoste;
  64.     /**
  65.      * @ORM\Column(type="string", length=255, nullable=true)
  66.      */
  67.     private $autorDegree;
  68.     /**
  69.      * @ORM\Column(type="string", length=255, nullable=true)
  70.      */
  71.     private $youtube;
  72.     /**
  73.      * @ORM\Column(type="string", length=255, nullable=true)
  74.      */
  75.     private $facebook;
  76.     /**
  77.      * @ORM\Column(type="string", length=255, nullable=true)
  78.      */
  79.     private $linkedIn;
  80.     /**
  81.      * @ORM\Column(type="string", length=255, nullable=true)
  82.      */
  83.     private $twitter;
  84.     /**
  85.      * @ORM\Column(type="string", length=255, nullable=true)
  86.      */
  87.     private $instagram;
  88.     /**
  89.      * @ORM\Column(type="text", nullable=true)
  90.      */
  91.     private $speach;
  92.     /**
  93.      * @ORM\Column(type="integer", nullable=true)
  94.      */
  95.     private $rang;
  96.     public function __construct()
  97.     {
  98.       $this->date = new \Datetime();
  99.     }
  100.     public function getId(): ?int
  101.     {
  102.         return $this->id;
  103.     }
  104.     public function getClientExtension()
  105.     {
  106.         $tabextension explode('.'$this->getOriginalName());
  107.         $nbelem count($tabextension);
  108.         if($nbelem 1)
  109.         {
  110.             return $tabextension[$nbelem 1];
  111.         }else{
  112.             return "";
  113.         }
  114.     }
  115.     public function getTimeOfSendingFiles(): string
  116.     {
  117.         if($this->date != null)
  118.         {
  119.             return $this->date->format('Y-m-d H:i:s');
  120.         }else{
  121.             return "0000-00-00 00:00:00";
  122.         }
  123.     }
  124.     public function getContentUrl(): ?string
  125.     {
  126.         return $this->contentUrl;
  127.     }
  128.     public function setContentUrl(?string $contentUrl): self
  129.     {
  130.         $this->contentUrl $contentUrl;
  131.         return $this;
  132.     }
  133.     public function getFilePath(): ?string
  134.     {
  135.         return $this->filePath;
  136.     }
  137.     public function setFilePath(?string $filePath): self
  138.     {
  139.         $this->filePath $filePath;
  140.         return $this;
  141.     }
  142.     public function getImageSize(): ?string
  143.     {
  144.         return $this->imageSize;
  145.     }
  146.     public function setImageSize(?string $imageSize): self
  147.     {
  148.         $this->imageSize $imageSize;
  149.         return $this;
  150.     }
  151.     public function getOriginalName(): ?string
  152.     {
  153.         return $this->originalName;
  154.     }
  155.     public function setOriginalName(?string $originalName): self
  156.     {
  157.         $this->originalName $originalName;
  158.         return $this;
  159.     }
  160.     public function getDate(): ?\DateTimeInterface
  161.     {
  162.         return $this->date;
  163.     }
  164.     public function setDate(\DateTimeInterface $date): self
  165.     {
  166.         $this->date $date;
  167.         return $this;
  168.     }
  169.     public function getMimeType(): ?string
  170.     {
  171.         return $this->mimeType;
  172.     }
  173.     public function setMimeType(string $mimeType null): self
  174.     {
  175.         $this->mimeType $mimeType;
  176.         return $this;
  177.     }
  178.     public function getUser(): ?User
  179.     {
  180.         return $this->user;
  181.     }
  182.     public function setUser(?User $user): self
  183.     {
  184.         $this->user $user;
  185.         return $this;
  186.     }
  187.     public function getAutorName(): ?string
  188.     {
  189.         return $this->autorName;
  190.     }
  191.     public function setAutorName(string $autorName): self
  192.     {
  193.         $this->autorName $autorName;
  194.         return $this;
  195.     }
  196.     public function getAutorPoste(): ?string
  197.     {
  198.         return $this->autorPoste;
  199.     }
  200.     public function setAutorPoste(?string $autorPoste): self
  201.     {
  202.         $this->autorPoste $autorPoste;
  203.         return $this;
  204.     }
  205.     public function getYoutube(): ?string
  206.     {
  207.         return $this->youtube;
  208.     }
  209.     public function setYoutube(?string $youtube): self
  210.     {
  211.         $this->youtube $youtube;
  212.         return $this;
  213.     }
  214.     public function getFacebook(): ?string
  215.     {
  216.         return $this->facebook;
  217.     }
  218.     public function setFacebook(?string $facebook): self
  219.     {
  220.         $this->facebook $facebook;
  221.         return $this;
  222.     }
  223.     public function getLinkedIn(): ?string
  224.     {
  225.         return $this->linkedIn;
  226.     }
  227.     public function setLinkedIn(?string $linkedIn): self
  228.     {
  229.         $this->linkedIn $linkedIn;
  230.         return $this;
  231.     }
  232.     public function getTwitter(): ?string
  233.     {
  234.         return $this->twitter;
  235.     }
  236.     public function setTwitter(?string $twitter): self
  237.     {
  238.         $this->twitter $twitter;
  239.         return $this;
  240.     }
  241.     public function getInstagram(): ?string
  242.     {
  243.         return $this->instagram;
  244.     }
  245.     public function setInstagram(?string $instagram): self
  246.     {
  247.         $this->instagram $instagram;
  248.         return $this;
  249.     }
  250.     public function getSpeach(): ?string
  251.     {
  252.         return $this->speach;
  253.     }
  254.     public function setSpeach(?string $speach): self
  255.     {
  256.         $this->speach $speach;
  257.         return $this;
  258.     }
  259.     public function getAutorDegree(): ?string
  260.     {
  261.         return $this->autorDegree;
  262.     }
  263.     public function setAutorDegree(?string $autorDegree): self
  264.     {
  265.         $this->autorDegree $autorDegree;
  266.         return $this;
  267.     }
  268.     public function getRang(): ?int
  269.     {
  270.         return $this->rang;
  271.     }
  272.     public function setRang(?int $rang): self
  273.     {
  274.         $this->rang $rang;
  275.         return $this;
  276.     }
  277. }