OwnerTrait.php 669 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. namespace OwnerVoterBundle\Entity\Traits;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Symfony\Component\Validator\Constraints as Assert;
  5. trait OwnerVoterTrait
  6. {
  7. /**
  8. * @var string $owner
  9. *
  10. * @ORM\Column(type="string", length=128, nullable=false)
  11. *
  12. * @Assert\NotBlank(
  13. * payload={"field"="owner"}
  14. * )
  15. */
  16. private $owner;
  17. /**
  18. * @return string
  19. */
  20. public function getOwner()
  21. {
  22. return $this->owner;
  23. }
  24. /**
  25. * @param string $owner
  26. *
  27. * @return $this
  28. */
  29. public function setOwner($owner = null)
  30. {
  31. $this->owner = $owner;
  32. return $this;
  33. }
  34. }