diff --git a/core/lib/Drupal/Core/Entity/EntityChangedInterface.php b/core/lib/Drupal/Core/Entity/EntityChangedInterface.php new file mode 100644 index 0000000..9a6c194 --- /dev/null +++ b/core/lib/Drupal/Core/Entity/EntityChangedInterface.php @@ -0,0 +1,26 @@ +changed->value; + } + } diff --git a/core/modules/file/lib/Drupal/file/FileInterface.php b/core/modules/file/lib/Drupal/file/FileInterface.php index ba81881..73783ef 100644 --- a/core/modules/file/lib/Drupal/file/FileInterface.php +++ b/core/modules/file/lib/Drupal/file/FileInterface.php @@ -8,12 +8,13 @@ namespace Drupal\file; use Drupal\Core\Entity\ContentEntityInterface; +use Drupal\Core\Entity\EntityChangedInterface; use Drupal\user\UserInterface; /** * Defines getter and setter methods for file entity base fields. */ -interface FileInterface extends ContentEntityInterface { +interface FileInterface extends ContentEntityInterface, EntityChangedInterface { /** * Returns the name of the file. @@ -111,14 +112,6 @@ public function setPermanent(); public function setTemporary(); /** - * Returns the timestamp when the file was created. - * - * @return int - * Creation timestamp of the file. - */ - public function getChangedTime(); - - /** * Returns the user that owns this file. * * @return \Drupal\user\UserInterface diff --git a/core/modules/node/lib/Drupal/node/NodeInterface.php b/core/modules/node/lib/Drupal/node/NodeInterface.php index 249e1ec..12d334b 100644 --- a/core/modules/node/lib/Drupal/node/NodeInterface.php +++ b/core/modules/node/lib/Drupal/node/NodeInterface.php @@ -7,13 +7,14 @@ namespace Drupal\node; +use Drupal\Core\Entity\EntityChangedInterface; use Drupal\Core\Entity\ContentEntityInterface; use Drupal\user\UserInterface; /** * Provides an interface defining a node entity. */ -interface NodeInterface extends ContentEntityInterface { +interface NodeInterface extends ContentEntityInterface, EntityChangedInterface { /** * Returns the node type. @@ -63,14 +64,6 @@ public function getCreatedTime(); public function setCreatedTime($timestamp); /** - * Returns the node modification timestamp. - * - * @return int - * Node creation timestamp. - */ - public function getChangedTime(); - - /** * Returns the node promotion status. * * @return bool