interface EntityChangedInterface in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Entity/EntityChangedInterface.php \Drupal\Core\Entity\EntityChangedInterface
Defines an interface for entity change timestamp tracking.
This data may be useful for more precise cache invalidation (especially on the client side) and concurrent editing locking.
The entity system automatically adds in the 'EntityChanged' constraint for entity types implementing this interface in order to disallow concurrent editing.
Hierarchy
- interface \Drupal\Core\Entity\EntityChangedInterface
Expanded class hierarchy of EntityChangedInterface
All classes that implement EntityChangedInterface
See also
Drupal\Core\Entity\Plugin\Validation\Constraint\EntityChangedConstraint
12 files declare their use of EntityChangedInterface
- BlockContentInterface.php in core/
modules/ block_content/ src/ BlockContentInterface.php - Contains \Drupal\block_content\BlockContentInterface.
- CommentInterface.php in core/
modules/ comment/ src/ CommentInterface.php - Contains \Drupal\comment\CommentInterface.
- CommentStatistics.php in core/
modules/ comment/ src/ CommentStatistics.php - Contains \Drupal\comment\CommentStatistics.
- EntityTestConstraints.php in core/
modules/ system/ tests/ modules/ entity_test/ src/ Entity/ EntityTestConstraints.php - Contains \Drupal\entity_test\Entity\EntityTestConstraints.
- EntityTestMulChanged.php in core/
modules/ system/ tests/ modules/ entity_test/ src/ Entity/ EntityTestMulChanged.php - Contains \Drupal\entity_test\Entity\EntityTestMulChanged.
File
- core/
lib/ Drupal/ Core/ Entity/ EntityChangedInterface.php, line 22 - Contains \Drupal\Core\Entity\EntityChangedInterface.
Namespace
Drupal\Core\EntityView source
interface EntityChangedInterface {
/**
* Gets the timestamp of the last entity change for the current translation.
*
* @return int
* The timestamp of the last entity save operation.
*/
public function getChangedTime();
/**
* Sets the timestamp of the last entity change for the current translation.
*
* @param int $timestamp
* The timestamp of the last entity save operation.
*
* @return $this
*/
public function setChangedTime($timestamp);
/**
* Gets the timestamp of the last entity change across all translations.
*
* @return int
* The timestamp of the last entity save operation across all
* translations.
*/
public function getChangedTimeAcrossTranslations();
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
EntityChangedInterface:: |
public | function | Gets the timestamp of the last entity change for the current translation. | |
EntityChangedInterface:: |
public | function | Gets the timestamp of the last entity change across all translations. | |
EntityChangedInterface:: |
public | function | Sets the timestamp of the last entity change for the current translation. |