src/Entity/ConfigTranslation.php line 30

  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM,
  4.     Doctrine\DBAL\Types\Types;
  5. use Symfony\Component\Serializer\Annotation\Groups;
  6. use ApiPlatform\Metadata\ApiProperty,
  7.     ApiPlatform\Metadata\ApiResource,
  8.     ApiPlatform\Metadata\Get;
  9. use App\Entity\Trait\IdTrait,
  10.     App\Entity\Trait\UuidTrait,
  11.     App\Entity\Trait\SEOTrait,
  12.     App\Entity\Trait\TimestampableTrait,
  13.     App\Entity\Trait\TranslationTrait,
  14.     App\Entity\Interface\TranslationInterface,
  15.     App\Enum\Language,
  16.     App\Repository\ConfigTranslationRepository;
  17. use App\Attribute\Sanitizeable;
  18. #[ApiResource(
  19.     security'is_granted("' Config::class . '")',
  20.     operations: [ new Get() ],
  21.     extraProperties: ['standard_put' => false],
  22. )]
  23. #[ORM\Entity(repositoryClassConfigTranslationRepository::class)]
  24. class ConfigTranslation implements TranslationInterface
  25. {
  26.     use IdTrait,
  27.         UuidTrait,
  28.         SEOTrait,
  29.         TimestampableTrait,
  30.         TranslationTrait;
  31.     #[ApiProperty(description'Title')]
  32.     #[Groups(['read''write'])]
  33.     #[ORM\Column(typeTypes::STRINGlength255nullabletrue)]
  34.     private ?string $title null;
  35.     #[ApiProperty(description'Alert A: message')]
  36.     #[Groups(['read:' self::class, 'write'])]
  37.     #[ORM\Column(typeTypes::STRINGlength1023nullabletrue)]
  38.     private ?string $alertAMessage null;
  39.     #[ApiProperty(description'Alert A: link')]
  40.     #[Groups(['read:' self::class, 'write'])]
  41.     #[ORM\Column(typeTypes::STRINGlength255nullabletrue)]
  42.     private ?string $alertALink null;
  43.     #[ApiProperty(description'Alert B: message')]
  44.     #[Groups(['read:' self::class, 'write'])]
  45.     #[ORM\Column(typeTypes::STRINGlength1023nullabletrue)]
  46.     private ?string $alertBMessage null;
  47.     #[ApiProperty(description'Alert B: link')]
  48.     #[Groups(['read:' self::class, 'write'])]
  49.     #[ORM\Column(typeTypes::STRINGlength255nullabletrue)]
  50.     private ?string $alertBLink null;
  51.     #[ApiProperty(description'Alert C: message')]
  52.     #[Groups(['read:' self::class, 'write'])]
  53.     #[ORM\Column(typeTypes::STRINGlength1023nullabletrue)]
  54.     private ?string $alertCMessage null;
  55.     #[ApiProperty(description'Alert C: link')]
  56.     #[Groups(['read:' self::class, 'write'])]
  57.     #[ORM\Column(typeTypes::STRINGlength255nullabletrue)]
  58.     private ?string $alertCLink null;
  59.     #[ApiProperty(description'CONTACT: address')]
  60.     #[Groups(['read:' self::class, 'write'])]
  61.     #[Sanitizeable]
  62.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  63.     private ?string $contactAddress null;
  64.     #[ApiProperty(description'CONTACT: support')]
  65.     #[Groups(['read:' self::class, 'write'])]
  66.     #[Sanitizeable]
  67.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  68.     private ?string $contactSupport null;
  69.     #[ApiProperty(description'CONTACT: cooperation')]
  70.     #[Groups(['read:' self::class, 'write'])]
  71.     #[Sanitizeable]
  72.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  73.     private ?string $contactCooperation null;
  74.     #[ApiProperty(description'Home: left block title')]
  75.     #[Groups(['read:' self::class, 'write'])]
  76.     #[ORM\Column(typeTypes::STRINGlength255nullabletrue)]
  77.     private ?string $homeLeftBlockTitle null;
  78.     #[ApiProperty(description'Home: left block text')]
  79.     #[Groups(['read:' self::class, 'write'])]
  80.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  81.     private ?string $homeLeftBlockText null;
  82.     #[ApiProperty(description'Home: left block button title')]
  83.     #[Groups(['read:' self::class, 'write'])]
  84.     #[ORM\Column(typeTypes::STRINGlength255nullabletrue)]
  85.     private ?string $homeLeftBlockButtonTitle null;
  86.     #[ApiProperty(description'Home: left block button link')]
  87.     #[Groups(['read:' self::class, 'write'])]
  88.     #[ORM\Column(typeTypes::STRINGlength255nullabletrue)]
  89.     private ?string $homeLeftBlockButtonLink null;
  90.     #[ApiProperty(description'Home: right block title')]
  91.     #[Groups(['read:' self::class, 'write'])]
  92.     #[ORM\Column(typeTypes::STRINGlength255nullabletrue)]
  93.     private ?string $homeRightBlockTitle null;
  94.     #[ApiProperty(description'Home: right block text')]
  95.     #[Groups(['read:' self::class, 'write'])]
  96.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  97.     private ?string $homeRightBlockText null;
  98.     #[ApiProperty(description'Home: right block button title')]
  99.     #[Groups(['read:' self::class, 'write'])]
  100.     #[ORM\Column(typeTypes::STRINGlength255nullabletrue)]
  101.     private ?string $homeRightBlockButtonTitle null;
  102.     #[ApiProperty(description'Home: right block button link')]
  103.     #[Groups(['read:' self::class, 'write'])]
  104.     #[ORM\Column(typeTypes::STRINGlength255nullabletrue)]
  105.     private ?string $homeRightBlockButtonLink null;
  106.     #[ApiProperty(description'Home: bottom block title')]
  107.     #[Groups(['read:' self::class, 'write'])]
  108.     #[ORM\Column(typeTypes::STRINGlength255nullabletrue)]
  109.     private ?string $homeBottomBlockTitle null;
  110.     #[ApiProperty(description'Home: bottom block text')]
  111.     #[Groups(['read:' self::class, 'write'])]
  112.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  113.     private ?string $homeBottomBlockText null;
  114.     #[ApiProperty(description'Home: bottom block button title')]
  115.     #[Groups(['read:' self::class, 'write'])]
  116.     #[ORM\Column(typeTypes::STRINGlength255nullabletrue)]
  117.     private ?string $homeBottomBlockButtonTitle null;
  118.     #[ApiProperty(description'Home: bottom block button link')]
  119.     #[Groups(['read:' self::class, 'write'])]
  120.     #[ORM\Column(typeTypes::STRINGlength255nullabletrue)]
  121.     private ?string $homeBottomBlockButtonLink null;
  122.     public function __construct(Config $parentLanguage $lang)
  123.     {
  124.         $this->setUuid();
  125.         $this->parent $parent;
  126.         $this->lang $lang;
  127.         $this->createdAt = new \DateTimeImmutable();
  128.         $this->updatedAt = new \DateTimeImmutable();
  129.         $parent->addTranslation($this);
  130.     }
  131.     public function getTitle(): ?string
  132.     {
  133.         return $this->title;
  134.     }
  135.     public function setTitle(?string $title): self
  136.     {
  137.         $this->title $title;
  138.         return $this;
  139.     }
  140.     public function getAlertAMessage(): ?string
  141.     {
  142.         return $this->alertAMessage;
  143.     }
  144.     public function setAlertAMessage(?string $alertAMessage): self
  145.     {
  146.         $this->alertAMessage $alertAMessage;
  147.         return $this;
  148.     }
  149.     public function getAlertALink(): ?string
  150.     {
  151.         return $this->alertALink;
  152.     }
  153.     public function setAlertALink(?string $alertALink): self
  154.     {
  155.         $this->alertALink $alertALink;
  156.         return $this;
  157.     }
  158.     public function getAlertBMessage(): ?string
  159.     {
  160.         return $this->alertBMessage;
  161.     }
  162.     public function setAlertBMessage(?string $alertBMessage): self
  163.     {
  164.         $this->alertBMessage $alertBMessage;
  165.         return $this;
  166.     }
  167.     public function getAlertBLink(): ?string
  168.     {
  169.         return $this->alertBLink;
  170.     }
  171.     public function setAlertBLink(?string $alertBLink): self
  172.     {
  173.         $this->alertBLink $alertBLink;
  174.         return $this;
  175.     }
  176.     public function getAlertCMessage(): ?string
  177.     {
  178.         return $this->alertCMessage;
  179.     }
  180.     public function setAlertCMessage(?string $alertCMessage): self
  181.     {
  182.         $this->alertCMessage $alertCMessage;
  183.         return $this;
  184.     }
  185.     public function getAlertCLink(): ?string
  186.     {
  187.         return $this->alertCLink;
  188.     }
  189.     public function setAlertCLink(?string $alertCLink): self
  190.     {
  191.         $this->alertCLink $alertCLink;
  192.         return $this;
  193.     }
  194.     public function getContactAddress(): ?string
  195.     {
  196.         return $this->contactAddress;
  197.     }
  198.     public function setContactAddress(?string $contactAddress): self
  199.     {
  200.         $this->contactAddress $contactAddress;
  201.         return $this;
  202.     }
  203.     public function getContactSupport(): ?string
  204.     {
  205.         return $this->contactSupport;
  206.     }
  207.     public function setContactSupport(?string $contactSupport): self
  208.     {
  209.         $this->contactSupport $contactSupport;
  210.         return $this;
  211.     }
  212.     public function getContactCooperation(): ?string
  213.     {
  214.         return $this->contactCooperation;
  215.     }
  216.     public function setContactCooperation(?string $contactCooperation): self
  217.     {
  218.         $this->contactCooperation $contactCooperation;
  219.         return $this;
  220.     }
  221.     public function getHomeLeftBlockTitle(): ?string
  222.     {
  223.         return $this->homeLeftBlockTitle;
  224.     }
  225.     public function setHomeLeftBlockTitle(?string $homeLeftBlockTitle): self
  226.     {
  227.         $this->homeLeftBlockTitle $homeLeftBlockTitle;
  228.         return $this;
  229.     }
  230.     public function getHomeLeftBlockText(): ?string
  231.     {
  232.         return $this->homeLeftBlockText;
  233.     }
  234.     public function setHomeLeftBlockText(?string $homeLeftBlockText): self
  235.     {
  236.         $this->homeLeftBlockText $homeLeftBlockText;
  237.         return $this;
  238.     }
  239.     public function getHomeLeftBlockButtonTitle(): ?string
  240.     {
  241.         return $this->homeLeftBlockButtonTitle;
  242.     }
  243.     public function setHomeLeftBlockButtonTitle(?string $homeLeftBlockButtonTitle): self
  244.     {
  245.         $this->homeLeftBlockButtonTitle $homeLeftBlockButtonTitle;
  246.         return $this;
  247.     }
  248.     public function getHomeLeftBlockButtonLink(): ?string
  249.     {
  250.         return $this->homeLeftBlockButtonLink;
  251.     }
  252.     public function setHomeLeftBlockButtonLink(?string $homeLeftBlockButtonLink): self
  253.     {
  254.         $this->homeLeftBlockButtonLink $homeLeftBlockButtonLink;
  255.         return $this;
  256.     }
  257.     public function getHomeRightBlockTitle(): ?string
  258.     {
  259.         return $this->homeRightBlockTitle;
  260.     }
  261.     public function setHomeRightBlockTitle(?string $homeRightBlockTitle): self
  262.     {
  263.         $this->homeRightBlockTitle $homeRightBlockTitle;
  264.         return $this;
  265.     }
  266.     public function getHomeRightBlockText(): ?string
  267.     {
  268.         return $this->homeRightBlockText;
  269.     }
  270.     public function setHomeRightBlockText(?string $homeRightBlockText): self
  271.     {
  272.         $this->homeRightBlockText $homeRightBlockText;
  273.         return $this;
  274.     }
  275.     public function getHomeRightBlockButtonTitle(): ?string
  276.     {
  277.         return $this->homeRightBlockButtonTitle;
  278.     }
  279.     public function setHomeRightBlockButtonTitle(?string $homeRightBlockButtonTitle): self
  280.     {
  281.         $this->homeRightBlockButtonTitle $homeRightBlockButtonTitle;
  282.         return $this;
  283.     }
  284.     public function getHomeRightBlockButtonLink(): ?string
  285.     {
  286.         return $this->homeRightBlockButtonLink;
  287.     }
  288.     public function setHomeRightBlockButtonLink(?string $homeRightBlockButtonLink): self
  289.     {
  290.         $this->homeRightBlockButtonLink $homeRightBlockButtonLink;
  291.         return $this;
  292.     }
  293.     public function getHomeBottomBlockTitle(): ?string
  294.     {
  295.         return $this->homeBottomBlockTitle;
  296.     }
  297.     public function setHomeBottomBlockTitle(?string $homeBottomBlockTitle): self
  298.     {
  299.         $this->homeBottomBlockTitle $homeBottomBlockTitle;
  300.         return $this;
  301.     }
  302.     public function getHomeBottomBlockText(): ?string
  303.     {
  304.         return $this->homeBottomBlockText;
  305.     }
  306.     public function setHomeBottomBlockText(?string $homeBottomBlockText): self
  307.     {
  308.         $this->homeBottomBlockText $homeBottomBlockText;
  309.         return $this;
  310.     }
  311.     public function getHomeBottomBlockButtonTitle(): ?string
  312.     {
  313.         return $this->homeBottomBlockButtonTitle;
  314.     }
  315.     public function setHomeBottomBlockButtonTitle(?string $homeBottomBlockButtonTitle): self
  316.     {
  317.         $this->homeBottomBlockButtonTitle $homeBottomBlockButtonTitle;
  318.         return $this;
  319.     }
  320.     public function getHomeBottomBlockButtonLink(): ?string
  321.     {
  322.         return $this->homeBottomBlockButtonLink;
  323.     }
  324.     public function setHomeBottomBlockButtonLink(?string $homeBottomBlockButtonLink): self
  325.     {
  326.         $this->homeBottomBlockButtonLink $homeBottomBlockButtonLink;
  327.         return $this;
  328.     }
  329. }