EntityDataDefinitionInterface.php 1020 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php
  2. namespace Drupal\Core\Entity\TypedData;
  3. use Drupal\Core\TypedData\ComplexDataDefinitionInterface;
  4. /**
  5. * Interface for typed data entity definitions.
  6. */
  7. interface EntityDataDefinitionInterface extends ComplexDataDefinitionInterface {
  8. /**
  9. * Gets the entity type ID.
  10. *
  11. * @return string|null
  12. * The entity type ID, or NULL if the entity type is unknown.
  13. */
  14. public function getEntityTypeId();
  15. /**
  16. * Sets the entity type ID.
  17. *
  18. * @param string $entity_type_id
  19. * The entity type to set.
  20. *
  21. * @return $this
  22. */
  23. public function setEntityTypeId($entity_type_id);
  24. /**
  25. * Gets the array of possible entity bundles.
  26. *
  27. * @return array|null
  28. * The array of possible bundles, or NULL for any.
  29. */
  30. public function getBundles();
  31. /**
  32. * Sets the array of possible entity bundles.
  33. *
  34. * @param array|null $bundles
  35. * The array of possible bundles, or NULL for any.
  36. *
  37. * @return $this
  38. */
  39. public function setBundles(array $bundles = NULL);
  40. }