Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x

ContentEntityStorageInterface.php

Namespace

Drupal\Core\Entity

File

core/lib/Drupal/Core/Entity/ContentEntityStorageInterface.php

View source
<?php

namespace Drupal\Core\Entity;


/**
 * A storage that supports content entity types.
 */
interface ContentEntityStorageInterface extends 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 = []);

}

Interfaces

Title Deprecated Summary
ContentEntityStorageInterface A storage that supports content entity types.

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal