src/JuridicusBundle/Entity/PdfStempel.php line 12

Open in your IDE?
  1. <?php
  2. namespace JF\JuridicusBundle\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Symfony\Component\Validator\Constraints as Assert;
  5. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  6. /**
  7. * PdfStempel
  8. */
  9. class PdfStempel extends Pdf
  10. {
  11. const CLASSNAME = __CLASS__;
  12. /**
  13. * @var \DateTime
  14. * @Assert\Type(\DateTimeInterface::class)
  15. */
  16. private $created_at;
  17. /**
  18. * @var \DateTime
  19. * @Assert\Type(\DateTimeInterface::class)
  20. */
  21. private $updated_at;
  22. /**
  23. * @var \JF\JuridicusBundle\Entity\Kunde
  24. * @Assert\Valid
  25. * @Assert\NotNull
  26. */
  27. private $kunde;
  28. /**
  29. * Set created_at
  30. *
  31. * @param \DateTime $createdAt
  32. * @return PdfStempel
  33. */
  34. public function setCreatedAt($createdAt)
  35. {
  36. $this->created_at = $createdAt;
  37. return $this;
  38. }
  39. /**
  40. * Get created_at
  41. *
  42. * @return \DateTime
  43. */
  44. public function getCreatedAt()
  45. {
  46. return $this->created_at;
  47. }
  48. /**
  49. * Set updated_at
  50. *
  51. * @param \DateTime $updatedAt
  52. * @return PdfStempel
  53. */
  54. public function setUpdatedAt($updatedAt)
  55. {
  56. $this->updated_at = $updatedAt;
  57. return $this;
  58. }
  59. /**
  60. * Get updated_at
  61. *
  62. * @return \DateTime
  63. */
  64. public function getUpdatedAt()
  65. {
  66. return $this->updated_at;
  67. }
  68. /**
  69. * Set kunde [OWNING SIDE]
  70. *
  71. * @param \JF\JuridicusBundle\Entity\Kunde $kunde
  72. * @return PdfStempel
  73. */
  74. public function setKunde(Kunde $kunde = null)
  75. {
  76. $this->kunde = $kunde;
  77. return $this;
  78. }
  79. /**
  80. * Get kunde
  81. *
  82. * @return \JF\JuridicusBundle\Entity\Kunde
  83. */
  84. public function getKunde()
  85. {
  86. return $this->kunde;
  87. }
  88. /**
  89. * Get dir
  90. *
  91. * @return string
  92. */
  93. public function getDir()
  94. {
  95. return realpath( __DIR__ . '/../../../../app/files/pdf/stempel' );
  96. }
  97. /**
  98. *
  99. * @return string
  100. */
  101. public function __toString()
  102. {
  103. return $this->path;
  104. }
  105. }