src/Entity/ProductStatus.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\SuperClass\BaseEntity;
  4. use App\Repository\ProductStatusRepository;
  5. use Doctrine\ORM\Mapping as ORM;
  6. /**
  7. * @ORM\Entity(repositoryClass=ProductStatusRepository::class)
  8. */
  9. class ProductStatus extends BaseEntity
  10. {
  11. /**
  12. * @ORM\Column(type="string", length=255)
  13. */
  14. private ?string $title;
  15. public function getTitle(): ?string
  16. {
  17. return $this->title;
  18. }
  19. public function setTitle(string $name): self
  20. {
  21. $this->title = $name;
  22. return $this;
  23. }
  24. public function toArray()
  25. {
  26. return [
  27. 'id' => $this->getId(),
  28. 'title' => $this->getTitle(),
  29. 'cards' => [],
  30. ];
  31. }
  32. }