Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / lib / Drupal / Core / Entity / TranslatableRevisionableStorageInterface.php
1 <?php
2
3 namespace Drupal\Core\Entity;
4
5 /**
6  * A storage that supports translatable and revisionable entity types.
7  */
8 interface TranslatableRevisionableStorageInterface extends TranslatableStorageInterface, RevisionableStorageInterface {
9
10   /**
11    * Creates a new revision starting off from the specified entity object.
12    *
13    * When dealing with a translatable entity, this will merge the default
14    * revision with the active translation of the passed entity.
15    *
16    * @param \Drupal\Core\Entity\EntityInterface|\Drupal\Core\Entity\RevisionableInterface $entity
17    *   The revisionable entity object being modified.
18    * @param bool $default
19    *   (optional) Whether the new revision should be marked as default. Defaults
20    *   to TRUE.
21    * @param bool|null $keep_untranslatable_fields
22    *   (optional) Whether untranslatable field values should be kept or copied
23    *   from the default revision when generating a merged revision. Defaults to
24    *   TRUE if the provided entity is the default translation and untranslatable
25    *   fields should only affect the default translation, FALSE otherwise.
26    *
27    * @return \Drupal\Core\Entity\EntityInterface|\Drupal\Core\Entity\RevisionableInterface
28    *   A new translatable entity revision object.
29    */
30   public function createRevision(RevisionableInterface $entity, $default = TRUE, $keep_untranslatable_fields = NULL);
31
32   /**
33    * Returns the latest revision affecting the specified translation.
34    *
35    * @param int|string $entity_id
36    *   The entity identifier.
37    * @param string $langcode
38    *   The language code of the translation.
39    *
40    * @return int|string|null
41    *   A revision ID or NULL if no revision affecting the specified translation
42    *   could be found.
43    */
44   public function getLatestTranslationAffectedRevisionId($entity_id, $langcode);
45
46 }