comparison core/lib/Drupal/Core/Entity/EntityChangedInterface.php @ 0:4c8ae668cc8c

Initial import (non-working)
author Chris Cannam
date Wed, 29 Nov 2017 16:09:58 +0000
parents
children 7a779792577d
comparison
equal deleted inserted replaced
-1:000000000000 0:4c8ae668cc8c
1 <?php
2
3 namespace Drupal\Core\Entity;
4
5 /**
6 * Defines an interface for entity change timestamp tracking.
7 *
8 * This data may be useful for more precise cache invalidation (especially
9 * on the client side) and concurrent editing locking.
10 *
11 * The entity system automatically adds in the 'EntityChanged' constraint for
12 * entity types implementing this interface in order to disallow concurrent
13 * editing.
14 *
15 * @see Drupal\Core\Entity\Plugin\Validation\Constraint\EntityChangedConstraint
16 */
17 interface EntityChangedInterface {
18
19 /**
20 * Gets the timestamp of the last entity change for the current translation.
21 *
22 * @return int
23 * The timestamp of the last entity save operation.
24 */
25 public function getChangedTime();
26
27 /**
28 * Sets the timestamp of the last entity change for the current translation.
29 *
30 * @param int $timestamp
31 * The timestamp of the last entity save operation.
32 *
33 * @return $this
34 */
35 public function setChangedTime($timestamp);
36
37 /**
38 * Gets the timestamp of the last entity change across all translations.
39 *
40 * @return int
41 * The timestamp of the last entity save operation across all
42 * translations.
43 */
44 public function getChangedTimeAcrossTranslations();
45
46 }