You are here

protected function LibraryItemRevisionRevertForm::prepareRevertedRevision in Paragraphs 8

Prepares a revision to be reverted.

Parameters

\Drupal\paragraphs_library\LibraryItemInterface $library_item_revision: The revision to be reverted.

Return value

\Drupal\paragraphs_library\LibraryItemInterface The prepared revision ready to be stored.

1 call to LibraryItemRevisionRevertForm::prepareRevertedRevision()
LibraryItemRevisionRevertForm::submitForm in modules/paragraphs_library/src/Form/LibraryItemRevisionRevertForm.php
Form submission handler.

File

modules/paragraphs_library/src/Form/LibraryItemRevisionRevertForm.php, line 130

Class

LibraryItemRevisionRevertForm

Namespace

Drupal\paragraphs_library\Form

Code

protected function prepareRevertedRevision(LibraryItemInterface $library_item_revision) {
  $library_item_revision
    ->setNewRevision();
  $library_item_revision
    ->isDefaultRevision(TRUE);
  return $library_item_revision;
}