src/Entity/Services.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\Common\Collections\Collection;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Symfony\Component\Validator\Constraints as Assert;
  7. /**
  8.  * @ORM\Entity(repositoryClass="App\Repository\ServicesRepository")
  9.  */
  10. class Services
  11. {
  12.     public function __construct(){
  13.                                                                                 $this->isEnabled false;
  14.                                                                             }
  15.     /**
  16.      * @ORM\Column(name="id", type="integer")
  17.      * @ORM\Id
  18.      * @ORM\GeneratedValue(strategy="AUTO")
  19.      */
  20.     private $id;
  21.     /**
  22.      * @ORM\Column(name="title", type="string", length=255, nullable=true)
  23.      */
  24.     private $title;
  25.     /**
  26.      * @ORM\Column(name="description", type="text", nullable=true)
  27.      */
  28.     private $description;
  29.     /**
  30.      * @ORM\Column(name="content", type="text", nullable=true)
  31.      */
  32.     private $content;
  33.     /**
  34.      * @ORM\OneToOne(targetEntity="App\Entity\Picture", cascade={"persist","remove"}, orphanRemoval=true)
  35.      * @ORM\JoinColumn(nullable=true)
  36.      */
  37.     private $banner;
  38.     /**
  39.      * @ORM\OneToOne(targetEntity="App\Entity\Picture", cascade={"persist","remove"}, orphanRemoval=true)
  40.      * @ORM\JoinColumn(nullable=true)
  41.      */
  42.     private $icon;
  43.     /**
  44.      * @ORM\Column(name="isEnabled", type="boolean", nullable=true)
  45.      */
  46.     private $isEnabled;
  47.     /**
  48.      * @ORM\Column(name="createdAt", type="datetime", nullable=true)
  49.      */
  50.     private $createdAt;
  51.     /**
  52.      * @ORM\Column(name="lastUpdate", type="datetime", nullable=true)
  53.      */
  54.     private $lastUpdate;
  55.     /**
  56.      * @ORM\Column(type="string", length=255, nullable=true)
  57.      */
  58.     private $btnText;
  59.     /**
  60.      * @ORM\Column(type="string", length=255, nullable=true)
  61.      */
  62.     private $btnLink;
  63.     /**
  64.      * @ORM\Column(type="string", length=255, nullable=true)
  65.      */
  66.     private $color;
  67.     /**
  68.      * @ORM\Column(type="text", nullable=true)
  69.      */
  70.     private $tasks;
  71.     /**
  72.      * @ORM\Column(type="text", nullable=true)
  73.      */
  74.     private $resume;
  75.     /**
  76.      * @ORM\Column(type="text", nullable=true)
  77.      */
  78.     private $missions;
  79.     /**
  80.      * @ORM\Column(type="text", nullable=true)
  81.      */
  82.     private $benefits;
  83.     /**
  84.      * @ORM\Column(type="string", length=255, nullable=true)
  85.      */
  86.     private $slug;
  87.     /**
  88.      * @ORM\ManyToOne(targetEntity=ServicesCategories::class, inversedBy="resources", fetch="EAGER")
  89.      * @ORM\JoinColumn(nullable=true)
  90.      */
  91.     private $category;
  92.     public function getId(): ?int
  93.     {
  94.         return $this->id;
  95.     }
  96.     public function getTitle(): ?string
  97.     {
  98.         return $this->title;
  99.     }
  100.     public function setTitle(?string $title): self
  101.     {
  102.         $this->title $title;
  103.         return $this;
  104.     }
  105.     public function getDescription(): ?string
  106.     {
  107.         return $this->description;
  108.     }
  109.     public function setDescription(?string $description): self
  110.     {
  111.         $this->description $description;
  112.         return $this;
  113.     }
  114.     public function getContent(): ?string
  115.     {
  116.         return $this->content;
  117.     }
  118.     public function setContent(?string $content): self
  119.     {
  120.         $this->content $content;
  121.         return $this;
  122.     }
  123.     public function getBanner(): ?Picture
  124.     {
  125.         return $this->banner;
  126.     }
  127.     public function setBanner(?Picture $banner): self
  128.     {
  129.         if($banner->getTarget()){
  130.             $this->banner $banner;
  131.             $this->banner->setDir('upload/images/services');
  132.             $this->banner->setThumbnailDir('upload/thumbnails/services');
  133.         }
  134.         return $this;
  135.     }
  136.     public function getIcon(): ?Picture
  137.     {
  138.         return $this->icon;
  139.     }
  140.     public function setIcon(?Picture $icon): self
  141.     {
  142.         if($icon->getTarget()){
  143.             $this->icon $icon;
  144.             $this->icon->setDir('upload/images/services');
  145.             $this->icon->setThumbnailDir('upload/thumbnails/services');
  146.         }
  147.         return $this;
  148.     }
  149.     public function getIsEnabled(): ?bool
  150.     {
  151.         return $this->isEnabled;
  152.     }
  153.     public function setIsEnabled(?bool $isEnabled): self
  154.     {
  155.         $this->isEnabled $isEnabled;
  156.         return $this;
  157.     }
  158.     public function getCreatedAt(): ?\DateTimeInterface
  159.     {
  160.         return $this->createdAt;
  161.     }
  162.     public function setCreatedAt(?\DateTimeInterface $createdAt): self
  163.     {
  164.         $this->createdAt $createdAt;
  165.         return $this;
  166.     }
  167.     public function getLastUpdate(): ?\DateTimeInterface
  168.     {
  169.         return $this->lastUpdate;
  170.     }
  171.     public function setLastUpdate(?\DateTimeInterface $lastUpdate): self
  172.     {
  173.         $this->lastUpdate $lastUpdate;
  174.         return $this;
  175.     }
  176.     public function getBtnText(): ?string
  177.     {
  178.         return $this->btnText;
  179.     }
  180.     public function setBtnText(?string $btnText): self
  181.     {
  182.         $this->btnText $btnText;
  183.         return $this;
  184.     }
  185.     public function getBtnLink(): ?string
  186.     {
  187.         return $this->btnLink;
  188.     }
  189.     public function setBtnLink(?string $btnLink): self
  190.     {
  191.         $this->btnLink $btnLink;
  192.         return $this;
  193.     }
  194.     public function getColor(): ?string
  195.     {
  196.         return $this->color;
  197.     }
  198.     public function setColor(?string $color): self
  199.     {
  200.         $this->color $color;
  201.         return $this;
  202.     }
  203.     public function getTasks(): ?string
  204.     {
  205.         return $this->tasks;
  206.     }
  207.     public function setTasks(?string $tasks): self
  208.     {
  209.         $this->tasks $tasks;
  210.         return $this;
  211.     }
  212.     public function getResume(): ?string
  213.     {
  214.         return $this->resume;
  215.     }
  216.     public function setResume(?string $resume): self
  217.     {
  218.         $this->resume $resume;
  219.         return $this;
  220.     }
  221.     public function getMissions(): ?string
  222.     {
  223.         return $this->missions;
  224.     }
  225.     public function setMissions(?string $missions): self
  226.     {
  227.         $this->missions $missions;
  228.         return $this;
  229.     }
  230.     public function getBenefits(): ?string
  231.     {
  232.         return $this->benefits;
  233.     }
  234.     public function setBenefits(?string $benefits): self
  235.     {
  236.         $this->benefits $benefits;
  237.         return $this;
  238.     }
  239.     public function getSlug(): ?string
  240.     {
  241.         return $this->slug;
  242.     }
  243.     public function setSlug(?string $slug): self
  244.     {
  245.         $this->slug $slug;
  246.         return $this;
  247.     }
  248.     public function getCategory(): ?ServicesCategories
  249.     {
  250.         return $this->category;
  251.     }
  252.     public function setCategory(?ServicesCategories $category): self
  253.     {
  254.         $this->category $category;
  255.         return $this;
  256.     }
  257. }