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.

74 lines
1.9KB

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