Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

BlameableTrait.php 1.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. namespace Lc\AdminBundle\Model\Cms;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Gedmo\Mapping\Annotation as Gedmo;
  5. use Lc\AdminBundle\IModel\User\UserInterface;
  6. trait BlameableTrait
  7. {
  8. /**
  9. * @Gedmo\Blameable(on="create")
  10. * @ORM\ManyToOne(targetEntity="App\Entity\User")
  11. * @ORM\JoinColumn(nullable=false)
  12. */
  13. protected $createdBy;
  14. /**
  15. * @Gedmo\Blameable(on="update")
  16. * @ORM\ManyToOne(targetEntity="App\Entity\User")
  17. * @ORM\JoinColumn(nullable=false)
  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. }