Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

FileModel.php 1.9KB

3 lat temu
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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 FileModel implements SortableInterface, BlameableInterface, TimestampableInterface, TranslatableInterface,
  17. DevAliasInterface, EntityInterface, FileInterface
  18. {
  19. use DevAliasTrait;
  20. use BlameableTrait;
  21. use TimestampableTrait;
  22. use TranslatableTrait;
  23. use SortableTrait;
  24. /**
  25. * @Gedmo\Translatable
  26. * @ORM\Column(type="string", length=255, nullable=true)
  27. */
  28. protected $path;
  29. /**
  30. * @Gedmo\Translatable
  31. * @ORM\Column(type="string", length=255, nullable=true)
  32. */
  33. protected $legend;
  34. public function __toString(){
  35. return ''.$this->getLegend();
  36. }
  37. public function getPath(): ?string
  38. {
  39. return $this->path;
  40. }
  41. public function setPath(?string $path): self
  42. {
  43. $this->path = $path;
  44. return $this;
  45. }
  46. public function getLegend(): ?string
  47. {
  48. return $this->legend;
  49. }
  50. public function setLegend(?string $legend): self
  51. {
  52. $this->legend = $legend;
  53. return $this;
  54. }
  55. }