Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

51 rinda
1.0KB

  1. <?php
  2. namespace Lc\SovBundle\Doctrine\Extension;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Gedmo\Mapping\Annotation as Gedmo;
  5. use Lc\SovBundle\Model\User\UserInterface;
  6. trait BlameableTrait
  7. {
  8. /**
  9. * @Gedmo\Blameable(on="create")
  10. * @ORM\ManyToOne(targetEntity="Lc\SovBundle\Model\User\UserInterface")
  11. * @ORM\JoinColumn(nullable=true)
  12. */
  13. protected $createdBy;
  14. /**
  15. * @Gedmo\Blameable(on="update")
  16. * @ORM\ManyToOne(targetEntity="Lc\SovBundle\Model\User\UserInterface")
  17. * @ORM\JoinColumn(nullable=true)
  18. */
  19. protected $updatedBy;
  20. public function getCreatedBy(): ?UserInterface
  21. {
  22. return $this->createdBy;
  23. }
  24. public function setCreatedBy(?UserInterface $createdBy): self
  25. {
  26. $this->createdBy = $createdBy;
  27. return $this;
  28. }
  29. public function getUpdatedBy(): ?UserInterface
  30. {
  31. return $this->updatedBy;
  32. }
  33. public function setUpdatedBy(?UserInterface $updatedBy): self
  34. {
  35. $this->updatedBy = $updatedBy;
  36. return $this;
  37. }
  38. }