Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

SettingModel.php 1.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <?php
  2. namespace Lc\SovBundle\Model\Setting;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Lc\SovBundle\Model\File\FileInterface;
  5. /**
  6. * @ORM\MappedSuperclass()
  7. */
  8. abstract class SettingModel implements SettingInterface
  9. {
  10. /**
  11. * @ORM\Column(type="string", length=63, nullable=true)
  12. */
  13. protected $name;
  14. /**
  15. * @ORM\Column(type="text", nullable=true)
  16. */
  17. protected $text;
  18. /**
  19. * @ORM\Column(type="datetime", nullable=true)
  20. */
  21. protected $date;
  22. /**
  23. * @ORM\ManyToOne(targetEntity=FileInterface::class, cascade={"persist", "remove"})
  24. */
  25. protected $file;
  26. public function getName(): ?string
  27. {
  28. return $this->name;
  29. }
  30. public function setName(?string $name): self
  31. {
  32. $this->name = $name;
  33. return $this;
  34. }
  35. public function getText(): ?string
  36. {
  37. return $this->text;
  38. }
  39. public function setText($text): self
  40. {
  41. $this->text = $text;
  42. return $this;
  43. }
  44. public function getDate(): ?\DateTimeInterface
  45. {
  46. return $this->date;
  47. }
  48. public function setDate(?\DateTimeInterface $date): self
  49. {
  50. $this->date = $date;
  51. return $this;
  52. }
  53. public function getFile(): ?FileInterface
  54. {
  55. return $this->file;
  56. }
  57. public function setFile(?FileInterface $file): self
  58. {
  59. $this->file = $file;
  60. return $this;
  61. }
  62. }