ContentEntityStorageInterface.php 752 B

1234567891011121314151617181920212223242526
  1. <?php
  2. namespace Drupal\Core\Entity;
  3. /**
  4. * A storage that supports content entity types.
  5. */
  6. interface ContentEntityStorageInterface extends EntityStorageInterface, TranslatableRevisionableStorageInterface {
  7. /**
  8. * Creates an entity with sample field values.
  9. *
  10. * @param string|bool $bundle
  11. * (optional) The entity bundle.
  12. * @param array $values
  13. * (optional) Any default values to use during generation.
  14. *
  15. * @return \Drupal\Core\Entity\FieldableEntityInterface
  16. * A fieldable content entity.
  17. *
  18. * @throws \Drupal\Core\Entity\EntityStorageException
  19. * Thrown if the bundle does not exist or was needed but not specified.
  20. */
  21. public function createWithSampleValues($bundle = FALSE, array $values = []);
  22. }