src/Entity/ContentBlock.php line 9

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ContentBlockRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. #[ORM\Entity(repositoryClass: ContentBlockRepository::class)]
  6. class ContentBlock
  7. {
  8. #[ORM\Id]
  9. #[ORM\GeneratedValue]
  10. #[ORM\Column]
  11. private ?int $id = null;
  12. #[ORM\Column(length: 255, unique: true)]
  13. private ?string $slug = null;
  14. #[ORM\Column(length: 255)]
  15. private ?string $title = null;
  16. #[ORM\Column(type: 'text', nullable: true)]
  17. private ?string $content = null;
  18. #[ORM\Column(type: 'integer', options: ['default' => 0])]
  19. private int $sortOrder = 0;
  20. public function getId(): ?int
  21. {
  22. return $this->id;
  23. }
  24. public function getSlug(): ?string
  25. {
  26. return $this->slug;
  27. }
  28. public function setSlug(string $slug): self
  29. {
  30. $this->slug = $slug;
  31. return $this;
  32. }
  33. public function getTitle(): ?string
  34. {
  35. return $this->title;
  36. }
  37. public function setTitle(string $title): self
  38. {
  39. $this->title = $title;
  40. return $this;
  41. }
  42. public function getContent(): ?string
  43. {
  44. return $this->content;
  45. }
  46. public function setContent(?string $content): self
  47. {
  48. $this->content = $content;
  49. return $this;
  50. }
  51. public function getSortOrder(): int
  52. {
  53. return $this->sortOrder;
  54. }
  55. public function setSortOrder(int $sortOrder): self
  56. {
  57. $this->sortOrder = $sortOrder;
  58. return $this;
  59. }
  60. }