Same name and namespace in other branches
- 8.9.x core/lib/Drupal/Core/Entity/RevisionableContentEntityBase.php \Drupal\Core\Entity\RevisionableContentEntityBase
- 9 core/lib/Drupal/Core/Entity/RevisionableContentEntityBase.php \Drupal\Core\Entity\RevisionableContentEntityBase
Provides a content entity with extended support for revisions.
In addition to the parent entity class, base fields and methods for accessing the revision log message, revision owner and the revision creation time are provided.
Hierarchy
- class \Drupal\Core\Entity\RevisionableContentEntityBase extends \Drupal\Core\Entity\ContentEntityBase implements RevisionLogInterface uses RevisionLogEntityTrait
Expanded class hierarchy of RevisionableContentEntityBase
Related topics
1 file declares its use of RevisionableContentEntityBase
- EntityTestWithRevisionLog.php in core/
modules/ system/ tests/ modules/ entity_test_revlog/ src/ Entity/ EntityTestWithRevisionLog.php
File
- core/
lib/ Drupal/ Core/ Entity/ RevisionableContentEntityBase.php, line 14
Namespace
Drupal\Core\EntityView source
abstract class RevisionableContentEntityBase extends ContentEntityBase implements RevisionLogInterface {
use RevisionLogEntityTrait;
/**
* {@inheritdoc}
*/
public static function baseFieldDefinitions(EntityTypeInterface $entity_type) {
$fields = parent::baseFieldDefinitions($entity_type);
$fields += static::revisionLogBaseFieldDefinitions($entity_type);
return $fields;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
RevisionableInterface:: |
public | function | Updates the loaded Revision ID with the revision ID. | |
CacheableDependencyInterface:: |
public | function | The maximum age for which this object may be cached. | 12 |
CacheableDependencyInterface:: |
public | function | The cache tags associated with this object. | 12 |
CacheableDependencyInterface:: |
public | function | The cache contexts associated with this object. | 12 |
EntityInterface:: |
public | function | Sets the original ID. | 1 |
EntityInterface:: |
public | function | Saves an entity permanently. | 3 |
EntityInterface:: |
public | function | Returns the cache tags that should be used to invalidate caches. | 3 |
RevisionLogEntityTrait:: |
public static | function | Provides revision-related base field definitions for an entity type. | |
RefinableCacheableDependencyInterface:: |
public | function | Merges the maximum age (in seconds) with the existing maximum age. | |
EntityInterface:: |
public static | function | Loads one or more entities. | 1 |
EntityInterface:: |
public static | function | Loads an entity. | 1 |
EntityInterface:: |
public | function | Indicates if a link template exists for a given key. | 1 |
RevisionLogEntityTrait:: |
public | function | Implements \Drupal\Core\Entity\RevisionLogInterface::setRevisionUserId(). | |
RevisionLogEntityTrait:: |
public | function | Implements \Drupal\Core\Entity\RevisionLogInterface::setRevisionUser(). | |
RevisionLogEntityTrait:: |
public | function | Implements \Drupal\Core\Entity\RevisionLogInterface::setRevisionLogMessage(). | |
RevisionLogEntityTrait:: |
public | function | Implements \Drupal\Core\Entity\RevisionLogInterface::setRevisionCreationTime(). | |
RevisionLogEntityTrait:: |
public | function | Implements \Drupal\Core\Entity\RevisionLogInterface::getRevisionUserId(). | |
RevisionLogEntityTrait:: |
public | function | Implements \Drupal\Core\Entity\RevisionLogInterface::getRevisionUser(). | |
RevisionLogEntityTrait:: |
public | function | Implements \Drupal\Core\Entity\RevisionLogInterface::getRevisionLogMessage(). | |
RevisionLogEntityTrait:: |
public | function | Implements \Drupal\Core\Entity\RevisionLogInterface::getRevisionCreationTime(). | |
EntityInterface:: |
public | function | Gets the URL object for the entity. | 1 |
RevisionableInterface:: |
public | function | Gets the revision identifier of the entity. | |
EntityInterface:: |
public | function | Gets the original ID. | 1 |
RevisionableInterface:: |
public | function | Gets the loaded Revision ID of the entity. | |
EntityInterface:: |
public | function | Gets the language of the entity. | 1 |
EntityInterface:: |
public | function | Gets the label of the entity. | 3 |
EntityInterface:: |
public | function | Gets the key that is used to store configuration dependencies. | 1 |
EntityInterface:: |
public | function | Gets the identifier. | 1 |
EntityInterface:: |
public | function | Gets the ID of the type of the entity. | 1 |
EntityInterface:: |
public | function | Gets the entity UUID (Universally Unique Identifier). | 1 |
RevisionLogEntityTrait:: |
abstract public | function | Gets the entity type definition. | |
EntityInterface:: |
public | function | Gets the configuration target identifier for the entity. | 1 |
EntityInterface:: |
public | function | Gets the configuration dependency name. | 1 |
EntityInterface:: |
public | function | Gets the bundle of the entity. | 1 |
EntityInterface:: |
public | function | Gets an array of all property values. | 2 |
EntityInterface:: |
public | function | Gets a typed data object for this entity object. | 1 |
EntityInterface:: |
public | function | Gets a list of URI relationships supported by this entity. | 1 |
EntityInterface:: |
public | function | Gets a list of entities referenced by this entity. | 2 |
EntityInterface:: |
public | function | Generates the HTML for a link to this entity. | 1 |
RevisionableInterface:: |
public | function | Enforces an entity to be saved as a new revision. | |
EntityInterface:: |
public | function | Enforces an entity to be new. | 1 |
EntityInterface:: |
public | function | Determines whether the entity is new. | 1 |
RevisionableInterface:: |
public | function | Determines whether a new revision should be created on save. | |
EntityInterface:: |
public | function | Deletes an entity permanently. | 1 |
EntityInterface:: |
public | function | Creates a duplicate of the entity. | 2 |
EntityInterface:: |
public static | function | Constructs a new entity object, without permanently saving it. | 1 |
RevisionableInterface:: |
public | function | Checks whether the entity object was a default revision when it was saved. | |
RevisionableInterface:: |
public | function | Checks if this entity is the latest revision. | |
RevisionableInterface:: |
public | function | Checks if this entity is the default revision. | |
AccessibleInterface:: |
public | function | Checks data value access. | 6 |
EntityInterface:: |
public static | function | Changes the values of an entity before it is created. | 4 |
RefinableCacheableDependencyInterface:: |
public | function | Adds cache tags. | |
RefinableCacheableDependencyInterface:: |
public | function | Adds cache contexts. | |
RefinableCacheableDependencyInterface:: |
public | function | Adds a dependency on an object: merges its cacheability metadata. | |
EntityInterface:: |
public static | function | Acts on loaded entities. | 2 |
EntityInterface:: |
public static | function | Acts on entities before they are deleted and before hooks are invoked. | 6 |
EntityInterface:: |
public static | function | Acts on deleted entities before the delete hook is invoked. | 7 |
EntityInterface:: |
public | function | Acts on an entity before the presave hook is invoked. | 8 |
EntityInterface:: |
public | function | Acts on a saved entity before the insert or update hook is invoked. | 8 |
RevisionableInterface:: |
public | function | Acts on a revision before it gets saved. | 3 |
EntityInterface:: |
public | function | Acts on a created entity before hooks are invoked. | 1 |
RevisionableContentEntityBase:: |
public static | function | 1 |