You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

70 lines
1.9KB

  1. <?php
  2. namespace Lc\SovBundle\Model\File;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Gedmo\Mapping\Annotation as Gedmo;
  5. use Lc\SovBundle\Doctrine\EntityInterface;
  6. use Lc\SovBundle\Doctrine\Extension\BlameableInterface;
  7. use Lc\SovBundle\Doctrine\Extension\BlameableTrait;
  8. use Lc\SovBundle\Doctrine\Extension\DevAliasInterface;
  9. use Lc\SovBundle\Doctrine\Extension\DevAliasTrait;
  10. use Lc\SovBundle\Doctrine\Extension\SortableInterface;
  11. use Lc\SovBundle\Doctrine\Extension\SortableTrait;
  12. use Lc\SovBundle\Doctrine\Extension\TimestampableInterface;
  13. use Lc\SovBundle\Doctrine\Extension\TimestampableTrait;
  14. use Lc\SovBundle\Doctrine\Extension\TranslatableInterface;
  15. use Lc\SovBundle\Doctrine\Extension\TranslatableTrait;
  16. abstract class File implements SortableInterface, BlameableInterface, TimestampableInterface, TranslatableInterface,
  17. DevAliasInterface, EntityInterface
  18. {
  19. use DevAliasTrait;
  20. use BlameableTrait;
  21. use TimestampableTrait;
  22. use TranslatableTrait;
  23. use SortableTrait;
  24. /**
  25. * @ORM\Column(type="string", length=255, nullable=true)
  26. */
  27. protected $path;
  28. /**
  29. * @Gedmo\Translatable
  30. * @ORM\Column(type="string", length=255, nullable=true)
  31. */
  32. protected $legend;
  33. public function __toString(){
  34. return $this->getLegend();
  35. }
  36. public function getPath(): ?string
  37. {
  38. return $this->path;
  39. }
  40. public function setPath(?string $path): self
  41. {
  42. $this->path = $path;
  43. return $this;
  44. }
  45. public function getLegend(): ?string
  46. {
  47. return $this->legend;
  48. }
  49. public function setLegend(?string $legend): self
  50. {
  51. $this->legend = $legend;
  52. return $this;
  53. }
  54. }