MateriauResponse.php 843 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. namespace Drupal\materio_graphql\GraphQL\Response;
  3. use Drupal\Core\Entity\EntityInterface;
  4. use Drupal\graphql\GraphQL\Response\Response;
  5. /**
  6. * Type of response used when an materiau is returned.
  7. */
  8. class MateriauResponse extends Response {
  9. /**
  10. * The materiau to be served.
  11. *
  12. * @var \Drupal\Core\Entity\EntityInterface|null
  13. */
  14. protected $materiau;
  15. /**
  16. * Sets the content.
  17. *
  18. * @param \Drupal\Core\Entity\EntityInterface|null $materiau
  19. * The materiau to be served.
  20. */
  21. public function setMateriau(?EntityInterface $materiau): void {
  22. $this->materiau = $materiau;
  23. }
  24. /**
  25. * Gets the materiau to be served.
  26. *
  27. * @return \Drupal\Core\Entity\EntityInterface|null
  28. * The materiau to be served.
  29. */
  30. public function materiau(): ?EntityInterface {
  31. return $this->materiau;
  32. }
  33. }