您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

57 行
1.0KB

  1. <?php
  2. namespace Lc\PietroBundle\Model\Workshop;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Lc\SovBundle\Doctrine\EntityInterface;
  5. use Lc\SovBundle\Doctrine\Extension\DevAliasTrait;
  6. use Lc\SovBundle\Doctrine\Extension\ImageTrait;
  7. /**
  8. * @ORM\MappedSuperclass()
  9. */
  10. abstract class Type implements TypeInterface, EntityInterface
  11. {
  12. use ImageTrait;
  13. use DevAliasTrait;
  14. /**
  15. * @ORM\Column(type="string", length=255)
  16. */
  17. protected $title;
  18. /**
  19. * @ORM\Column(type="string", length=255, nullable=true)
  20. */
  21. protected $color;
  22. public function __toString()
  23. {
  24. return $this->getTitle();
  25. }
  26. public function getTitle(): ?string
  27. {
  28. return $this->title;
  29. }
  30. public function setTitle(string $title): self
  31. {
  32. $this->title = $title;
  33. return $this;
  34. }
  35. public function getColor(): ?string
  36. {
  37. return $this->color;
  38. }
  39. public function setColor(string $color): self
  40. {
  41. $this->color = $color;
  42. return $this;
  43. }
  44. }