src/Entity/CaseStudies.php line 31

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\Traits\LinkTrait;
  4. use App\Entity\Traits\MetaTrait;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use App\Entity\Traits\ActiveTrait;
  7. use App\Entity\Traits\DeleteTrait;
  8. use App\Entity\Traits\TranslateTrait;
  9. use Gedmo\Mapping\Annotation as Gedmo;
  10. use App\Entity\Traits\ImageUploadTrait;
  11. use App\Entity\Traits\SitemapableTrait;
  12. use App\Entity\Traits\TitleAndContentTrait;
  13. use App\Entity\Traits\FifthImageUploadTrait;
  14. use App\Entity\Traits\ThirdImageUploadTrait;
  15. use App\Entity\Traits\FourthImageUploadTrait;
  16. use App\Entity\Traits\SecondImageUploadTrait;
  17. use App\Entity\Interfaces\DefaultLinkedEntity;
  18. use Gedmo\Timestampable\Traits\TimestampableEntity;
  19. /**
  20.  * CaseStudies.
  21.  *
  22.  * @Gedmo\Loggable
  23.  *
  24.  * @Gedmo\TranslationEntity(class="App\Entity\CaseStudiesTranslations")
  25.  */
  26. #[ORM\Entity(repositoryClass\App\Repository\CaseStudiesRepository::class)]
  27. #[ORM\Table(name'casestudies')]
  28. class CaseStudies implements DefaultLinkedEntity
  29. {
  30.     use TitleAndContentTrait;
  31.     use LinkTrait;
  32.     use MetaTrait;
  33.     use ActiveTrait;
  34.     use DeleteTrait;
  35.     use ImageUploadTrait;
  36.     use SecondImageUploadTrait;
  37.     use ThirdImageUploadTrait;
  38.     use FourthImageUploadTrait;
  39.     use FifthImageUploadTrait;
  40.     use TimestampableEntity;
  41.     use TranslateTrait;
  42.     use SitemapableTrait;
  43.     #[ORM\Column(name'id'type'integer')]
  44.     #[ORM\Id]
  45.     #[ORM\GeneratedValue(strategy'AUTO')]
  46.     private int $id;
  47.     #[ORM\Column(type'boolean')]
  48.     private $featured;
  49.     #[ORM\Column(type'string'length255nullabletrue)]
  50.     private $clientName;
  51.     #[ORM\Column(type'text'nullabletrue)]
  52.     private $clientTestimonial;
  53.     #[ORM\Column(type'string'length255nullabletrue)]
  54.     private $clientTestimonialAttestant;
  55.     #[ORM\Column(type'string'length255nullabletrue)]
  56.     private $clientTestimonialAttestantJobTitle;
  57.     #[ORM\Column(type'string'length255)]
  58.     private $projectName;
  59.     #[ORM\ManyToOne(targetEntitySectors::class, inversedBy'caseStudies')]
  60.     private $projectType;
  61.     #[ORM\Column(type'date'nullabletrue)]
  62.     private $projectStartDate;
  63.     #[ORM\Column(type'string'length255nullabletrue)]
  64.     private $projectDuration;
  65.     #[ORM\Column(type'string'length255nullabletrue)]
  66.     private $projectBudget;
  67.     #[ORM\Column(type'string'length255nullabletrue)]
  68.     private $projectLocation;
  69.     #[ORM\Column(type'string'length255nullabletrue)]
  70.     private $detailSubtitle;
  71.     #[ORM\Column(type'text')]
  72.     private $detailContent;
  73.     #[ORM\Column(type'string'length255nullabletrue)]
  74.     private $challengesSubtitle;
  75.     #[ORM\Column(type'text')]
  76.     private $challengesContent;
  77.     #[ORM\Column(type'string'length255nullabletrue)]
  78.     private $solutionSubtitle;
  79.     #[ORM\Column(type'text')]
  80.     private $solutionContent;
  81.     #[ORM\Column(type'text')]
  82.     private $kicker;
  83.     #[ORM\ManyToOne(targetEntityGallery::class)]
  84.     private $gallery;
  85.     #[ORM\ManyToOne(targetEntityTestimonial::class)]
  86.     private $testimonial;
  87.     public function getId(): int
  88.     {
  89.         return $this->id;
  90.     }
  91.     // REQUIRED BY THE META LINKS TRAIT
  92.     public function getLinkedPageId(): int
  93.     {
  94.         // CW TODO _ SET THIS CORRECTLY
  95.         return 9;
  96.     }
  97.     public function getFeatured(): ?bool
  98.     {
  99.         return $this->featured;
  100.     }
  101.     public function setFeatured(bool $featured): self
  102.     {
  103.         $this->featured $featured;
  104.         return $this;
  105.     }
  106.     public function getClientName(): ?string
  107.     {
  108.         return $this->clientName;
  109.     }
  110.     public function setClientName(?string $clientName): self
  111.     {
  112.         $this->clientName $clientName;
  113.         return $this;
  114.     }
  115.     public function getClientTestimonial(): ?string
  116.     {
  117.         return $this->clientTestimonial;
  118.     }
  119.     public function setClientTestimonial(?string $clientTestimonial): self
  120.     {
  121.         $this->clientTestimonial $clientTestimonial;
  122.         return $this;
  123.     }
  124.     public function getClientTestimonialAttestant(): ?string
  125.     {
  126.         return $this->clientTestimonialAttestant;
  127.     }
  128.     public function setClientTestimonialAttestant(?string $clientTestimonialAttestant): self
  129.     {
  130.         $this->clientTestimonialAttestant $clientTestimonialAttestant;
  131.         return $this;
  132.     }
  133.     public function getClientTestimonialAttestantJobTitle(): ?string
  134.     {
  135.         return $this->clientTestimonialAttestantJobTitle;
  136.     }
  137.     public function setClientTestimonialAttestantJobTitle(?string $clientTestimonialAttestantJobTitle): self
  138.     {
  139.         $this->clientTestimonialAttestantJobTitle $clientTestimonialAttestantJobTitle;
  140.         return $this;
  141.     }
  142.     public function getProjectName(): ?string
  143.     {
  144.         return $this->projectName;
  145.     }
  146.     public function setProjectName(string $projectName): self
  147.     {
  148.         $this->projectName $projectName;
  149.         return $this;
  150.     }
  151.     public function getProjectType(): ?Sectors
  152.     {
  153.         return $this->projectType;
  154.     }
  155.     public function setProjectType(?Sectors $projectType): self
  156.     {
  157.         $this->projectType $projectType;
  158.         return $this;
  159.     }
  160.     public function getProjectStartDate(): ?\DateTimeInterface
  161.     {
  162.         return $this->projectStartDate;
  163.     }
  164.     public function setProjectStartDate(?\DateTimeInterface $projectStartDate): self
  165.     {
  166.         $this->projectStartDate $projectStartDate;
  167.         return $this;
  168.     }
  169.     public function getProjectDuration(): ?string
  170.     {
  171.         return $this->projectDuration;
  172.     }
  173.     public function setProjectDuration(?string $projectDuration): self
  174.     {
  175.         $this->projectDuration $projectDuration;
  176.         return $this;
  177.     }
  178.     public function getProjectBudget(): ?string
  179.     {
  180.         return $this->projectBudget;
  181.     }
  182.     public function setProjectBudget(?string $projectBudget): self
  183.     {
  184.         $this->projectBudget $projectBudget;
  185.         return $this;
  186.     }
  187.     public function getProjectLocation(): ?string
  188.     {
  189.         return $this->projectLocation;
  190.     }
  191.     public function setProjectLocation(?string $projectLocation): self
  192.     {
  193.         $this->projectLocation $projectLocation;
  194.         return $this;
  195.     }
  196.     public function getDetailSubtitle(): ?string
  197.     {
  198.         return $this->detailSubtitle;
  199.     }
  200.     public function setDetailSubtitle(?string $detailSubtitle): self
  201.     {
  202.         $this->detailSubtitle $detailSubtitle;
  203.         return $this;
  204.     }
  205.     public function getDetailContent(): ?string
  206.     {
  207.         return $this->detailContent;
  208.     }
  209.     public function setDetailContent(string $detailContent): self
  210.     {
  211.         $this->detailContent $detailContent;
  212.         return $this;
  213.     }
  214.     public function getChallengesSubtitle(): ?string
  215.     {
  216.         return $this->challengesSubtitle;
  217.     }
  218.     public function setChallengesSubtitle(?string $challengesSubtitle): self
  219.     {
  220.         $this->challengesSubtitle $challengesSubtitle;
  221.         return $this;
  222.     }
  223.     public function getChallengesContent(): ?string
  224.     {
  225.         return $this->challengesContent;
  226.     }
  227.     public function setChallengesContent(string $challengesContent): self
  228.     {
  229.         $this->challengesContent $challengesContent;
  230.         return $this;
  231.     }
  232.     public function getSolutionSubtitle(): ?string
  233.     {
  234.         return $this->solutionSubtitle;
  235.     }
  236.     public function setSolutionSubtitle(?string $solutionSubtitle): self
  237.     {
  238.         $this->solutionSubtitle $solutionSubtitle;
  239.         return $this;
  240.     }
  241.     public function getSolutionContent(): ?string
  242.     {
  243.         return $this->solutionContent;
  244.     }
  245.     public function setSolutionContent(string $solutionContent): self
  246.     {
  247.         $this->solutionContent $solutionContent;
  248.         return $this;
  249.     }
  250.     public function getKicker(): ?string
  251.     {
  252.         return $this->kicker;
  253.     }
  254.     public function setKicker(string $kicker): self
  255.     {
  256.         $this->kicker $kicker;
  257.         return $this;
  258.     }
  259.     public function getGallery(): ?Gallery
  260.     {
  261.         return $this->gallery;
  262.     }
  263.     public function setGallery(?Gallery $gallery): self
  264.     {
  265.         $this->gallery $gallery;
  266.         return $this;
  267.     }
  268.     public function getTestimonial(): ?Testimonial
  269.     {
  270.         return $this->testimonial;
  271.     }
  272.     public function setTestimonial(?Testimonial $testimonial): self
  273.     {
  274.         $this->testimonial $testimonial;
  275.         return $this;
  276.     }
  277.     public function getSitemapRouteParams(): array
  278.     {
  279.         return ['slug' => $this->getSlug()];
  280.     }
  281.     public function isIncludedInSitemap(): bool
  282.     {
  283.         return $this->isActive() &&
  284.             ! $this->isDeleted();
  285.         ;
  286.     }
  287. }