src/Entity/HtmlBlocks.php line 24

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\Interfaces\DefaultEntity;
  4. use App\Entity\Traits\ActiveTrait;
  5. use App\Entity\Traits\DeleteTrait;
  6. use App\Entity\Traits\LinkTrait;
  7. use App\Entity\Traits\TitleAndContentTrait;
  8. use App\Entity\Traits\TranslateTrait;
  9. use Doctrine\ORM\Mapping as ORM;
  10. use Gedmo\Mapping\Annotation as Gedmo;
  11. use Gedmo\Timestampable\Traits\TimestampableEntity;
  12. /**
  13. * HtmlBlocks.
  14. *
  15. * @Gedmo\Loggable
  16. *
  17. * @Gedmo\TranslationEntity(class="App\Entity\HtmlBlocksTranslations")
  18. */
  19. #[ORM\Entity(repositoryClass: \App\Repository\HtmlBlocksRepository::class)]
  20. #[ORM\Table(name: 'html_blocks')]
  21. class HtmlBlocks implements DefaultEntity
  22. {
  23. use TitleAndContentTrait;
  24. use LinkTrait;
  25. use ActiveTrait;
  26. use DeleteTrait;
  27. use TimestampableEntity;
  28. use TranslateTrait;
  29. #[ORM\Column(name: 'id', type: 'integer')]
  30. #[ORM\Id]
  31. #[ORM\GeneratedValue(strategy: 'AUTO')]
  32. private int $id;
  33. /**
  34. * @Gedmo\Versioned
  35. *
  36. * @Gedmo\Translatable
  37. */
  38. #[ORM\Column(name: 'html', type: 'text', nullable: true)]
  39. private ?string $html = null;
  40. /**
  41. * Get id.
  42. *
  43. * @return int
  44. */
  45. public function getId()
  46. {
  47. return $this->id;
  48. }
  49. public function getHtml(): ?string
  50. {
  51. return $this->html;
  52. }
  53. public function setHtml($html): self
  54. {
  55. $this->html = $html;
  56. return $this;
  57. }
  58. public function getLinkedPageId(): int
  59. {
  60. return 0;
  61. }
  62. }