Deprecated: Symfony\Component\Translation\t(): Implicitly marking parameter $domain as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/t/taurushr/vendor/symfony/translation/Resources/functions.php on line 18

Deprecated: Symfony\Component\Dotenv\Dotenv::loadEnv(): Implicitly marking parameter $envKey as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/t/taurushr/vendor/symfony/dotenv/Dotenv.php on line 110

Deprecated: Symfony\Component\Runtime\GenericRuntime::getResolver(): Implicitly marking parameter $reflector as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/t/taurushr/vendor/symfony/runtime/GenericRuntime.php on line 89

Deprecated: Symfony\Component\Runtime\RuntimeInterface::getResolver(): Implicitly marking parameter $reflector as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/t/taurushr/vendor/symfony/runtime/RuntimeInterface.php on line 26

Deprecated: Symfony\Component\Console\Input\ArgvInput::__construct(): Implicitly marking parameter $argv as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/t/taurushr/vendor/symfony/console/Input/ArgvInput.php on line 46

Deprecated: Symfony\Component\Console\Input\ArgvInput::__construct(): Implicitly marking parameter $definition as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/t/taurushr/vendor/symfony/console/Input/ArgvInput.php on line 46

Deprecated: Symfony\Component\Console\Input\Input::__construct(): Implicitly marking parameter $definition as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/t/taurushr/vendor/symfony/console/Input/Input.php on line 36

Deprecated: Constant E_STRICT is deprecated in /var/www/html/t/taurushr/vendor/symfony/error-handler/ErrorHandler.php on line 58

Deprecated: Constant E_STRICT is deprecated in /var/www/html/t/taurushr/vendor/symfony/error-handler/ErrorHandler.php on line 76
Symfony Profiler

src/Entity/CaseStudies.php line 30

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\SubTitleTrait;
  9. use App\Entity\Traits\TranslateTrait;
  10. use App\Entity\Traits\FileUploadTrait;
  11. use Gedmo\Mapping\Annotation as Gedmo;
  12. use App\Entity\Traits\ImageUploadTrait;
  13. use App\Entity\Traits\SitemapableTrait;
  14. use App\Entity\Traits\TitleAndContentTrait;
  15. use App\Entity\Interfaces\DefaultLinkedEntity;
  16. use Gedmo\Timestampable\Traits\TimestampableEntity;
  17. use Symfony\Component\Validator\Constraints as Assert;
  18. /**
  19.  * CaseStudies.
  20.  *
  21.  * @Gedmo\Loggable
  22.  *
  23.  * @Gedmo\TranslationEntity(class="App\Entity\CaseStudiesTranslations")
  24.  */
  25. #[ORM\Entity(repositoryClass\App\Repository\CaseStudiesRepository::class)]
  26. #[ORM\Table(name'casestudies')]
  27. class CaseStudies implements DefaultLinkedEntity
  28. {
  29.     use TitleAndContentTrait;
  30.     use SubTitleTrait;
  31.     use LinkTrait;
  32.     use MetaTrait;
  33.     use ActiveTrait;
  34.     use DeleteTrait;
  35.     use ImageUploadTrait;
  36.     use FileUploadTrait;
  37.     use TimestampableEntity;
  38.     use TranslateTrait;
  39.     use SitemapableTrait;
  40.     #[ORM\Column(name'id'type'integer')]
  41.     #[ORM\Id]
  42.     #[ORM\GeneratedValue(strategy'AUTO')]
  43.     private readonly int $id;
  44.     #[ORM\Column(type'string'length255nullabletrue)]
  45.     private $cta_text;
  46.     #[ORM\Column(type'string'length255nullabletrue)]
  47.     private $cta_link;
  48.     #[ORM\Column(type'string'length255nullabletrue)]
  49.     private $quote;
  50.     #[ORM\ManyToOne(targetEntityTestimonial::class)]
  51.     private $testimonial;
  52.     #[ORM\Column(type'boolean'nullabletrue)]
  53.     private $featured;
  54.     #[ORM\Column(name'logo'type'string'length255nullabletrue)]
  55.     private ?string $logo null;
  56.     /**
  57.      * Override slug from LinkTrait to disable auto-update.
  58.      * Slug will only be auto-generated on create, but can be manually set.
  59.      *
  60.      * @Gedmo\Translatable
  61.      *
  62.      * @Gedmo\Versioned
  63.      *
  64.      * @Gedmo\Slug(fields={"title"}, separator="-", updatable=false)
  65.      */
  66.     #[ORM\Column(length255uniquetrue)]
  67.     private ?string $slug null;
  68.     public function getId(): int
  69.     {
  70.         return $this->id;
  71.     }
  72.     // REQUIRED BY THE META LINKS TRAIT
  73.     public function getLinkedPageId(): int
  74.     {
  75.         return 9;
  76.     }
  77.     public function getCtaText(): ?string
  78.     {
  79.         return $this->cta_text;
  80.     }
  81.     public function setCtaText(?string $cta_text): self
  82.     {
  83.         $this->cta_text $cta_text;
  84.         return $this;
  85.     }
  86.     public function getCtaLink(): ?string
  87.     {
  88.         return $this->cta_link;
  89.     }
  90.     public function setCtaLink(?string $cta_link): self
  91.     {
  92.         $this->cta_link $cta_link;
  93.         return $this;
  94.     }
  95.     public function getQuote(): ?string
  96.     {
  97.         return $this->quote;
  98.     }
  99.     public function setQuote(?string $quote): self
  100.     {
  101.         $this->quote $quote;
  102.         return $this;
  103.     }
  104.     public function getTestimonial(): ?Testimonial
  105.     {
  106.         return $this->testimonial;
  107.     }
  108.     public function setTestimonial(?Testimonial $testimonial): self
  109.     {
  110.         $this->testimonial $testimonial;
  111.         return $this;
  112.     }
  113.     public function getFeatured(): ?bool
  114.     {
  115.         return $this->featured;
  116.     }
  117.     public function setFeatured(?bool $featured): self
  118.     {
  119.         $this->featured $featured;
  120.         return $this;
  121.     }
  122.     public function getLogo(): ?string
  123.     {
  124.         return $this->logo;
  125.     }
  126.     public function setLogo(?string $logo): self
  127.     {
  128.         $this->logo $logo;
  129.         return $this;
  130.     }
  131.     public function getSitemapRouteParams(): array
  132.     {
  133.         return ['slug' => $this->getSlug()];
  134.     }
  135.     public function isIncludedInSitemap(): bool
  136.     {
  137.         return $this->isActive() &&
  138.             ! $this->isDeleted();
  139.         ;
  140.     }
  141.     /**
  142.      * Override setSlug from LinkTrait to allow manual setting.
  143.      * If empty string is provided, set to null to allow auto-generation on create.
  144.      */
  145.     public function setSlug(?string $slug): void
  146.     {
  147.         // Convert empty string to null so Gedmo can auto-generate on create
  148.         $this->slug = ($slug === '' || $slug === null) ? null $slug;
  149.     }
  150. }