TitledArticle.php 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. <?php
  2. namespace Blameable\Fixture\Entity;
  3. use Gedmo\Blameable\Blameable;
  4. use Gedmo\Mapping\Annotation as Gedmo;
  5. use Doctrine\ORM\Mapping as ORM;
  6. /**
  7. * @ORM\Entity
  8. */
  9. class TitledArticle implements Blameable
  10. {
  11. /**
  12. * @ORM\Id
  13. * @ORM\GeneratedValue
  14. * @ORM\Column(type="integer")
  15. */
  16. private $id;
  17. /**
  18. * @ORM\Column(name="title", type="string", length=128)
  19. */
  20. private $title;
  21. /**
  22. * @ORM\Column(name="text", type="string", length=128)
  23. */
  24. private $text;
  25. /**
  26. * @var string $updated
  27. *
  28. * @ORM\Column(name="chtext", type="string", nullable=true)
  29. * @Gedmo\Blameable(on="change", field="text")
  30. */
  31. private $chtext;
  32. /**
  33. * @var string $chtitle
  34. *
  35. * @ORM\Column(name="chtitle", type="string", nullable=true)
  36. * @Gedmo\Blameable(on="change", field="title")
  37. */
  38. private $chtitle;
  39. /**
  40. * @param string $chtext
  41. */
  42. public function setChtext($chtext)
  43. {
  44. $this->chtext = $chtext;
  45. }
  46. /**
  47. * @return string
  48. */
  49. public function getChtext()
  50. {
  51. return $this->chtext;
  52. }
  53. /**
  54. * @param string $chtitle
  55. */
  56. public function setChtitle($chtitle)
  57. {
  58. $this->chtitle = $chtitle;
  59. }
  60. /**
  61. * @return string
  62. */
  63. public function getChtitle()
  64. {
  65. return $this->chtitle;
  66. }
  67. public function setId($id)
  68. {
  69. $this->id = $id;
  70. }
  71. public function getId()
  72. {
  73. return $this->id;
  74. }
  75. public function setText($text)
  76. {
  77. $this->text = $text;
  78. }
  79. public function getText()
  80. {
  81. return $this->text;
  82. }
  83. public function setTitle($title)
  84. {
  85. $this->title = $title;
  86. }
  87. public function getTitle()
  88. {
  89. return $this->title;
  90. }
  91. }