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'Proces zakupowy: zgoda1')]
  75.     #[Groups(['read:' self::class, 'write'])]
  76.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  77.     private ?string $shopRules1 null;
  78.     #[ApiProperty(description'Proces zakupowy: zgoda2')]
  79.     #[Groups(['read:' self::class, 'write'])]
  80.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  81.     private ?string $shopRules2 null;
  82.     public function __construct(Config $parentLanguage $lang)
  83.     {
  84.         $this->setUuid();
  85.         $this->parent $parent;
  86.         $this->lang $lang;
  87.         $this->createdAt = new \DateTimeImmutable();
  88.         $this->updatedAt = new \DateTimeImmutable();
  89.         $parent->addTranslation($this);
  90.     }
  91.     public function getTitle(): ?string
  92.     {
  93.         return $this->title;
  94.     }
  95.     public function setTitle(?string $title): self
  96.     {
  97.         $this->title $title;
  98.         return $this;
  99.     }
  100.     public function getAlertAMessage(): ?string
  101.     {
  102.         return $this->alertAMessage;
  103.     }
  104.     public function setAlertAMessage(?string $alertAMessage): self
  105.     {
  106.         $this->alertAMessage $alertAMessage;
  107.         return $this;
  108.     }
  109.     public function getAlertALink(): ?string
  110.     {
  111.         return $this->alertALink;
  112.     }
  113.     public function setAlertALink(?string $alertALink): self
  114.     {
  115.         $this->alertALink $alertALink;
  116.         return $this;
  117.     }
  118.     public function getAlertBMessage(): ?string
  119.     {
  120.         return $this->alertBMessage;
  121.     }
  122.     public function setAlertBMessage(?string $alertBMessage): self
  123.     {
  124.         $this->alertBMessage $alertBMessage;
  125.         return $this;
  126.     }
  127.     public function getAlertBLink(): ?string
  128.     {
  129.         return $this->alertBLink;
  130.     }
  131.     public function setAlertBLink(?string $alertBLink): self
  132.     {
  133.         $this->alertBLink $alertBLink;
  134.         return $this;
  135.     }
  136.     public function getAlertCMessage(): ?string
  137.     {
  138.         return $this->alertCMessage;
  139.     }
  140.     public function setAlertCMessage(?string $alertCMessage): self
  141.     {
  142.         $this->alertCMessage $alertCMessage;
  143.         return $this;
  144.     }
  145.     public function getAlertCLink(): ?string
  146.     {
  147.         return $this->alertCLink;
  148.     }
  149.     public function setAlertCLink(?string $alertCLink): self
  150.     {
  151.         $this->alertCLink $alertCLink;
  152.         return $this;
  153.     }
  154.     public function getContactAddress(): ?string
  155.     {
  156.         return $this->contactAddress;
  157.     }
  158.     public function setContactAddress(?string $contactAddress): self
  159.     {
  160.         $this->contactAddress $contactAddress;
  161.         return $this;
  162.     }
  163.     public function getContactSupport(): ?string
  164.     {
  165.         return $this->contactSupport;
  166.     }
  167.     public function setContactSupport(?string $contactSupport): self
  168.     {
  169.         $this->contactSupport $contactSupport;
  170.         return $this;
  171.     }
  172.     public function getContactCooperation(): ?string
  173.     {
  174.         return $this->contactCooperation;
  175.     }
  176.     public function setContactCooperation(?string $contactCooperation): self
  177.     {
  178.         $this->contactCooperation $contactCooperation;
  179.         return $this;
  180.     }
  181.     public function getShopRules1(): ?string
  182.     {
  183.         return $this->shopRules1;
  184.     }
  185.     public function setShopRules1(?string $shopRules1): static
  186.     {
  187.         $this->shopRules1 $shopRules1;
  188.         return $this;
  189.     }
  190.     public function getShopRules2(): ?string
  191.     {
  192.         return $this->shopRules2;
  193.     }
  194.     public function setShopRules2(?string $shopRules2): static
  195.     {
  196.         $this->shopRules2 $shopRules2;
  197.         return $this;
  198.     }
  199. }