Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions stubs/Drupal/Core/Entity/RevisionableStorageInterface.stub
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,12 @@ interface RevisionableStorageInterface extends EntityStorageInterface {
* @param int|numeric-string $revision_id
*/
public function deleteRevision($revision_id): void;

/**
* @param R $entity
* @return R
* @template R of \Drupal\Core\Entity\RevisionableInterface
*/
public function createRevision(RevisionableInterface $entity, bool $default = TRUE);

}
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,11 @@ namespace Drupal\Core\Entity;
// This is fragile and relies on `ContentEntityStorageInterface` only implementing this interface.
interface TranslatableRevisionableStorageInterface extends RevisionableStorageInterface, TranslatableStorageInterface {

/**
* @param R $entity
* @return R
* @template R of \Drupal\Core\Entity\RevisionableInterface
*/
public function createRevision(RevisionableInterface $entity, bool $default = TRUE, ?bool $keep_untranslatable_fields = NULL);

}
Loading