src/Entity/Templates.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\SuperClass\BaseEntity;
  4. use App\Repository\TemplatesRepository;
  5. use Doctrine\ORM\Mapping as ORM;
  6. /**
  7. * @ORM\Entity(repositoryClass=TemplatesRepository::class)
  8. */
  9. class Templates extends BaseEntity
  10. {
  11. /**
  12. * @ORM\Column(type="string", length=255)
  13. */
  14. private $layout;
  15. /**
  16. * @ORM\ManyToOne(targetEntity=User::class, inversedBy="templates")
  17. */
  18. private $created_by;
  19. /**
  20. * @ORM\Column(type="string", length=255)
  21. */
  22. private $type;
  23. public function getLayout(): ?string
  24. {
  25. return $this->layout;
  26. }
  27. public function setLayout(string $layout): self
  28. {
  29. $this->layout = $layout;
  30. return $this;
  31. }
  32. public function getCreatedBy(): ?User
  33. {
  34. return $this->created_by;
  35. }
  36. public function setCreatedBy(?User $created_by): self
  37. {
  38. $this->created_by = $created_by;
  39. return $this;
  40. }
  41. public function getType(): ?string
  42. {
  43. return $this->type;
  44. }
  45. public function setType(string $type): self
  46. {
  47. $this->type = $type;
  48. return $this;
  49. }
  50. public function __toString()
  51. {
  52. return $this->getLayout().' - '.$this->getType();
  53. }
  54. }