Mercurial > hg > isophonics-drupal-site
annotate core/lib/Drupal/Core/Entity/ContentEntityInterface.php @ 14:1fec387a4317
Update Drupal core to 8.5.2 via Composer
author | Chris Cannam |
---|---|
date | Mon, 23 Apr 2018 09:46:53 +0100 |
parents | 4c8ae668cc8c |
children | c2387f117808 |
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 are |
Chris@0 | 9 * translatable and revisionable, while translations and revisions can be |
Chris@0 | 10 * enabled per entity type. It's best practice to always implement |
Chris@0 | 11 * ContentEntityInterface for content-like entities that should be stored in |
Chris@0 | 12 * some database, and enable/disable revisions and translations as desired. |
Chris@0 | 13 * |
Chris@0 | 14 * When implementing this interface which extends Traversable, make sure to list |
Chris@0 | 15 * IteratorAggregate or Iterator before this interface in the implements clause. |
Chris@0 | 16 * |
Chris@0 | 17 * @see \Drupal\Core\Entity\ContentEntityBase |
Chris@0 | 18 * |
Chris@0 | 19 * @ingroup entity_api |
Chris@0 | 20 */ |
Chris@14 | 21 interface ContentEntityInterface extends \Traversable, FieldableEntityInterface, TranslatableRevisionableInterface { |
Chris@0 | 22 |
Chris@0 | 23 /** |
Chris@0 | 24 * Gets the loaded Revision ID of the entity. |
Chris@0 | 25 * |
Chris@0 | 26 * @return int |
Chris@0 | 27 * The loaded Revision identifier of the entity, or NULL if the entity |
Chris@0 | 28 * does not have a revision identifier. |
Chris@0 | 29 */ |
Chris@0 | 30 public function getLoadedRevisionId(); |
Chris@0 | 31 |
Chris@0 | 32 /** |
Chris@0 | 33 * Updates the loaded Revision ID with the revision ID. |
Chris@0 | 34 * |
Chris@0 | 35 * This method should not be used, it could unintentionally cause the original |
Chris@0 | 36 * revision ID property value to be lost. |
Chris@0 | 37 * |
Chris@0 | 38 * @internal |
Chris@0 | 39 * |
Chris@0 | 40 * @return $this |
Chris@0 | 41 */ |
Chris@0 | 42 public function updateLoadedRevisionId(); |
Chris@0 | 43 |
Chris@0 | 44 } |