interface ContentEntityStorageInterface

Same name and namespace in other branches
  1. 11.x core/lib/Drupal/Core/Entity/ContentEntityStorageInterface.php \Drupal\Core\Entity\ContentEntityStorageInterface
  2. 10 core/lib/Drupal/Core/Entity/ContentEntityStorageInterface.php \Drupal\Core\Entity\ContentEntityStorageInterface
  3. 8.9.x core/lib/Drupal/Core/Entity/ContentEntityStorageInterface.php \Drupal\Core\Entity\ContentEntityStorageInterface

A storage that supports content entity types.

Hierarchy

Expanded class hierarchy of ContentEntityStorageInterface

All classes that implement ContentEntityStorageInterface

15 files declare their use of ContentEntityStorageInterface
CommentStorageInterface.php in core/modules/comment/src/CommentStorageInterface.php
EntityContextDefinition.php in core/lib/Drupal/Core/Plugin/Context/EntityContextDefinition.php
EntityContextDefinitionIsSatisfiedTest.php in core/tests/Drupal/Tests/Core/Plugin/Context/EntityContextDefinitionIsSatisfiedTest.php
EntityConverterTest.php in core/tests/Drupal/Tests/Core/ParamConverter/EntityConverterTest.php
EntityReferenceItem.php in core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php

... See full list

File

core/lib/Drupal/Core/Entity/ContentEntityStorageInterface.php, line 8

Namespace

Drupal\Core\Entity
View source
interface ContentEntityStorageInterface extends EntityStorageInterface, TranslatableRevisionableStorageInterface {
  
  /**
   * Creates an entity with sample field values.
   *
   * @param string|bool $bundle
   *   (optional) The entity bundle.
   * @param array $values
   *   (optional) Any default values to use during generation.
   *
   * @return \Drupal\Core\Entity\FieldableEntityInterface
   *   A fieldable content entity.
   *
   * @throws \Drupal\Core\Entity\EntityStorageException
   *   Thrown if the bundle does not exist or was needed but not specified.
   */
  public function createWithSampleValues($bundle = FALSE, array $values = []);

}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.