annotate core/lib/Drupal/Core/Entity/ContentEntityInterface.php @ 5:12f9dff5fda9
tip
Update to Drupal core 8.7.1
author |
Chris Cannam |
date |
Thu, 09 May 2019 15:34:47 +0100 |
parents |
a9cd425dd02b |
children |
|
rev |
line source |
Chris@0
|
1 <?php
|
Chris@0
|
2
|
Chris@0
|
3 namespace Drupal\Core\Entity;
|
Chris@0
|
4
|
Chris@0
|
5 /**
|
Chris@0
|
6 * Defines a common interface for all content entity objects.
|
Chris@0
|
7 *
|
Chris@0
|
8 * Content entities use fields for all their entity properties and can be
|
Chris@0
|
9 * translatable and revisionable. Translations and revisions can be
|
Chris@0
|
10 * enabled per entity type through annotation and using entity type hooks.
|
Chris@0
|
11 *
|
Chris@0
|
12 * It's best practice to always implement ContentEntityInterface for
|
Chris@0
|
13 * content-like entities that should be stored in some database, and
|
Chris@0
|
14 * enable/disable revisions and translations as desired.
|
Chris@0
|
15 *
|
Chris@0
|
16 * When implementing this interface which extends Traversable, make sure to list
|
Chris@0
|
17 * IteratorAggregate or Iterator before this interface in the implements clause.
|
Chris@0
|
18 *
|
Chris@0
|
19 * @see \Drupal\Core\Entity\ContentEntityBase
|
Chris@0
|
20 * @see \Drupal\Core\Entity\EntityTypeInterface
|
Chris@0
|
21 *
|
Chris@0
|
22 * @ingroup entity_api
|
Chris@0
|
23 */
|
Chris@5
|
24 interface ContentEntityInterface extends \Traversable, FieldableEntityInterface, TranslatableRevisionableInterface, SynchronizableInterface {
|
Chris@0
|
25
|
Chris@0
|
26 }
|