MateriauResponse.php 872 B

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