annotate 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
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 an interface for entity change timestamp tracking.
Chris@0 7 *
Chris@0 8 * This data may be useful for more precise cache invalidation (especially
Chris@0 9 * on the client side) and concurrent editing locking.
Chris@0 10 *
Chris@0 11 * The entity system automatically adds in the 'EntityChanged' constraint for
Chris@0 12 * entity types implementing this interface in order to disallow concurrent
Chris@0 13 * editing.
Chris@0 14 *
Chris@0 15 * @see Drupal\Core\Entity\Plugin\Validation\Constraint\EntityChangedConstraint
Chris@0 16 */
Chris@0 17 interface EntityChangedInterface {
Chris@0 18
Chris@0 19 /**
Chris@0 20 * Gets the timestamp of the last entity change for the current translation.
Chris@0 21 *
Chris@0 22 * @return int
Chris@0 23 * The timestamp of the last entity save operation.
Chris@0 24 */
Chris@0 25 public function getChangedTime();
Chris@0 26
Chris@0 27 /**
Chris@0 28 * Sets the timestamp of the last entity change for the current translation.
Chris@0 29 *
Chris@0 30 * @param int $timestamp
Chris@0 31 * The timestamp of the last entity save operation.
Chris@0 32 *
Chris@0 33 * @return $this
Chris@0 34 */
Chris@0 35 public function setChangedTime($timestamp);
Chris@0 36
Chris@0 37 /**
Chris@0 38 * Gets the timestamp of the last entity change across all translations.
Chris@0 39 *
Chris@0 40 * @return int
Chris@0 41 * The timestamp of the last entity save operation across all
Chris@0 42 * translations.
Chris@0 43 */
Chris@0 44 public function getChangedTimeAcrossTranslations();
Chris@0 45
Chris@0 46 }