ContentEntityInterface.php

Same filename in other branches
  1. 9 core/lib/Drupal/Core/Entity/ContentEntityInterface.php
  2. 10 core/lib/Drupal/Core/Entity/ContentEntityInterface.php
  3. 11.x core/lib/Drupal/Core/Entity/ContentEntityInterface.php

Namespace

Drupal\Core\Entity

File

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

View source
<?php

namespace Drupal\Core\Entity;


/**
 * Defines a common interface for all content entity objects.
 *
 * Content entities use fields for all their entity properties and can be
 * translatable and revisionable. Translations and revisions can be
 * enabled per entity type through annotation and using entity type hooks.
 *
 * It's best practice to always implement ContentEntityInterface for
 * content-like entities that should be stored in some database, and
 * enable/disable revisions and translations as desired.
 *
 * When implementing this interface which extends Traversable, make sure to list
 * IteratorAggregate or Iterator before this interface in the implements clause.
 *
 * @see \Drupal\Core\Entity\ContentEntityBase
 * @see \Drupal\Core\Entity\EntityTypeInterface
 *
 * @ingroup entity_api
 */
interface ContentEntityInterface extends \Traversable, FieldableEntityInterface, TranslatableRevisionableInterface, SynchronizableInterface {

}

Interfaces

Title Deprecated Summary
ContentEntityInterface Defines a common interface for all content entity objects.

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